-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Move compiler/codegen -> crates/codegen
#6260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move compiler/codegen -> crates/codegen
#6260
Conversation
WalkthroughThe workspace manifest ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (8)
crates/codegen/src/snapshots/rustpython_codegen__compile__tests__if_ands.snapis excluded by!**/*.snapcrates/codegen/src/snapshots/rustpython_codegen__compile__tests__if_mixed.snapis excluded by!**/*.snapcrates/codegen/src/snapshots/rustpython_codegen__compile__tests__if_ors.snapis excluded by!**/*.snapcrates/codegen/src/snapshots/rustpython_codegen__compile__tests__nested_double_async_with.snapis excluded by!**/*.snapcrates/codegen/src/snapshots/rustpython_compiler_core__compile__tests__if_ands.snapis excluded by!**/*.snapcrates/codegen/src/snapshots/rustpython_compiler_core__compile__tests__if_mixed.snapis excluded by!**/*.snapcrates/codegen/src/snapshots/rustpython_compiler_core__compile__tests__if_ors.snapis excluded by!**/*.snapcrates/codegen/src/snapshots/rustpython_compiler_core__compile__tests__nested_double_async_with.snapis excluded by!**/*.snap
📒 Files selected for processing (1)
Cargo.toml(1 hunks)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Cargo.toml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: Run snippets and cpython tests (macos-latest)
- GitHub Check: Run snippets and cpython tests (windows-latest)
- GitHub Check: Run snippets and cpython tests (ubuntu-latest)
- GitHub Check: Check Rust code with clippy
- GitHub Check: Run rust tests (windows-latest)
- GitHub Check: Run rust tests (macos-latest)
- GitHub Check: Run rust tests (ubuntu-latest)
- GitHub Check: Ensure compilation on various targets
- GitHub Check: Run snippets and cpython tests on wasm-wasi
- GitHub Check: Check the WASM package and demo
- GitHub Check: auto_format
| rustpython-compiler-core = { path = "crates/compiler-core", version = "0.4.0" } | ||
| rustpython-compiler = { path = "compiler", version = "0.4.0" } | ||
| rustpython-codegen = { path = "compiler/codegen", version = "0.4.0" } | ||
| rustpython-codegen = { path = "crates/codegen", version = "0.4.0" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify the directory move is complete and no stale references remain.
The workspace dependency path has been correctly updated from "compiler/codegen" to "crates/codegen". However, per the past review comments, this structural change requires verification:
- Confirm the
crates/codegendirectory exists with the expected crate content - Ensure no lingering references to
compiler/codegenremain in source files or build configuration - Verify the stale comment reference in
vm/src/stdlib/ast.rs:307(which referencescompiler/codegen/src/compile.rs) has been updated tocrates/codegen/src/compile.rs
🏁 Script executed:
#!/bin/bash
# Description: Verify the crates/codegen directory move is complete and comprehensive.
# Check 1: Verify crates/codegen directory exists
if [ -d "crates/codegen" ]; then
echo "✓ crates/codegen directory found"
else
echo "✗ crates/codegen directory NOT found"
exit 1
fi
# Check 2: Verify old compiler/codegen directory has been removed
if [ -d "compiler/codegen" ]; then
echo "✗ WARNING: Old compiler/codegen directory STILL EXISTS (should be removed)"
else
echo "✓ Old compiler/codegen directory removed"
fi
# Check 3: Search for remaining references to old path in code
echo ""
echo "Checking for remaining references to 'compiler/codegen' in source/config files:"
rg -n "compiler/codegen" --type rust --type toml --type yaml --type json -g '!target' -g '!.git' || echo "✓ No references found"
# Check 4: Verify the stale comment in ast.rs has been updated
echo ""
echo "Checking vm/src/stdlib/ast.rs:307 for updated path:"
if [ -f "vm/src/stdlib/ast.rs" ]; then
sed -n '305,310p' vm/src/stdlib/ast.rs
else
echo "✗ vm/src/stdlib/ast.rs not found"
fi
# Check 5: Verify crates/codegen/Cargo.toml exists
if [ -f "crates/codegen/Cargo.toml" ]; then
echo ""
echo "✓ crates/codegen/Cargo.toml found"
else
echo ""
echo "✗ crates/codegen/Cargo.toml NOT found"
fiLength of output: 580
Update the stale comment reference in vm/src/stdlib/ast.rs:307.
The Cargo.toml path update to "crates/codegen" is correct and the directory move is complete (old compiler/codegen directory has been removed). However, the comment at vm/src/stdlib/ast.rs:307 still references the old path and should be updated from compiler/codegen/src/compile.rs to crates/codegen/src/compile.rs.
🤖 Prompt for AI Agents
In vm/src/stdlib/ast.rs around line 307, the in-file comment still references
the old path "compiler/codegen/src/compile.rs"; update that comment to reference
the new location "crates/codegen/src/compile.rs" so the comment matches the
Cargo.toml change and the moved directory.
ref: #6214
Summary by CodeRabbit