GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Move `compiler/codegen` -> `crates/codegen` by ShaharNaveh · Pull Request #6260 · RustPython/RustPython

Conversation

@ShaharNaveh

@ShaharNaveh ShaharNaveh commented Nov 14, 2025 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

ref: #6214

Summary by CodeRabbit

  • Chores
    • Reorganized project configuration and internal dependencies.
    • Updated the internal codegen package location within the workspace to reflect repository structure changes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ShaharNaveh
Move compiler/codegen -> crates/codegen
b63b29c
@coderabbitai

coderabbitai Bot commented Nov 14, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Walkthrough

The workspace manifest (Cargo.toml) was updated: the codegen workspace member was moved from compiler/codegen to crates/codegen, and the rustpython-codegen workspace dependency path was adjusted; the package version remains 0.4.0.

Changes

Cohort / File(s) Change Summary
Workspace manifest
Cargo.toml
Removed compiler/codegen from [workspace] members and changed rustpython-codegen workspace dependency path from compiler/codegen → crates/codegen (version unchanged: 0.4.0).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Single manifest edit; low logic complexity but affects workspace layout.
  • Review attention:
    • Ensure no other workspace members or CI/scripting reference compiler/codegen.
    • Confirm crates/codegen/Cargo.toml exists and has correct package metadata.

Possibly related PRs

  • Move common -> crates/common #6256 — Makes the same pattern of moving a package into crates/ and updating Cargo.toml paths.

Poem

🐰 A hop from compiler to crates I go,

Tiny paws patter, tidy rows in tow.
Codegen shifted, paths made right,
I nibble carrots, then rest tonight. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main change: moving the compiler/codegen directory from compiler/ to crates/ location, which matches the actual modifications in Cargo.toml.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands and usage tips.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShaharNaveh ShaharNaveh mentioned this pull request Nov 14, 2025
Organize our rust code into crates/ directory #6214
Open
16 tasks
@fanninpm

fanninpm commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

@coderabbitai review

coderabbitai[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Nov 14, 2025

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

coderabbitai[bot]
coderabbitai Bot reviewed Nov 14, 2025
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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

📥 Commits

Reviewing files that changed from the base of the PR and between 609d99f and b63b29c.

⛔ Files ignored due to path filters (8)
  • crates/codegen/src/snapshots/rustpython_codegen__compile__tests__if_ands.snap is excluded by !**/*.snap
  • crates/codegen/src/snapshots/rustpython_codegen__compile__tests__if_mixed.snap is excluded by !**/*.snap
  • crates/codegen/src/snapshots/rustpython_codegen__compile__tests__if_ors.snap is excluded by !**/*.snap
  • crates/codegen/src/snapshots/rustpython_codegen__compile__tests__nested_double_async_with.snap is excluded by !**/*.snap
  • crates/codegen/src/snapshots/rustpython_compiler_core__compile__tests__if_ands.snap is excluded by !**/*.snap
  • crates/codegen/src/snapshots/rustpython_compiler_core__compile__tests__if_mixed.snap is excluded by !**/*.snap
  • crates/codegen/src/snapshots/rustpython_compiler_core__compile__tests__if_ors.snap is excluded by !**/*.snap
  • crates/codegen/src/snapshots/rustpython_compiler_core__compile__tests__nested_double_async_with.snap is excluded by !**/*.snap
📒 Files selected for processing (1)
  • Cargo.toml (1 hunks)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
youknowone
youknowone approved these changes Nov 14, 2025
View reviewed changes
@youknowone
Merge branch 'main' into move-compiler-codegen
07a93c7
coderabbitai[bot]
coderabbitai Bot reviewed Nov 14, 2025
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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

📥 Commits

Reviewing files that changed from the base of the PR and between b63b29c and 07a93c7.

📒 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Cargo.toml
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" }

@coderabbitai coderabbitai Bot Nov 14, 2025

Copy link
Copy Markdown
Contributor

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.

⚠️ Potential issue | 🟡 Minor

🧩 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:

  1. Confirm the crates/codegen directory exists with the expected crate content
  2. Ensure no lingering references to compiler/codegen remain in source files or build configuration
  3. Verify the stale comment reference in vm/src/stdlib/ast.rs:307 (which references compiler/codegen/src/compile.rs) has been updated to crates/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"
fi

Length 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ShaharNaveh
Merge remote-tracking branch 'upstream/main' into move-compiler-codegen
7813397
@youknowone
youknowone merged commit 7f45ba4 into RustPython:main Nov 15, 2025
13 checks passed

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 16, 2025
Move stdlib -> crates/stdlib #6268
Merged
Move wasm/lib -> crates/wasm #6280
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments
@youknowone youknowone youknowone approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ShaharNaveh @fanninpm @youknowone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.