Skip to content

Ruff fork#7532

Merged
youknowone merged 1 commit intoRustPython:mainfrom
youknowone:ruff-fork
Mar 29, 2026
Merged

Ruff fork#7532
youknowone merged 1 commit intoRustPython:mainfrom
youknowone:ruff-fork

Conversation

@youknowone
Copy link
Copy Markdown
Member

@youknowone youknowone commented Mar 29, 2026

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated Python parsing-related dependencies to the published 0.15.8 crates, switching from commit-based sourcing to version-based pinning for more stable, reproducible builds while retaining existing API compatibility.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 29, 2026

📝 Walkthrough

Walkthrough

Workspace dependency sources in Cargo.toml were changed for four Ruff-related crates: ruff_python_parser, ruff_python_ast, ruff_text_size, and ruff_source_file — switching from git-based references to registry-published packages pinned at version 0.15.8.

Changes

Cohort / File(s) Summary
Ruff crate dependency switches
Cargo.toml
Replaced git astral-sh/ruff workspace entries for ruff_python_parser, ruff_python_ast, ruff_text_size, ruff_source_file with registry packages named rustpython-ruff_* at version = "0.15.8". Old git/rev lines are retained but commented out.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 I swapped some crates, hopped through toml light,
From gitty paths to packages bright,
Four ruff friends bundled, version neat,
My paws tap-tap — the build feels sweet! 🎁✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Ruff fork' is vague and generic, failing to clearly describe the specific change of switching workspace dependencies from git to registry-based packages. Use a more descriptive title such as 'Switch ruff dependencies to published registry packages' or 'Update ruff dependencies to rustpython-ruff registry versions' to clearly convey the primary change.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@youknowone youknowone marked this pull request as ready for review March 29, 2026 08:19
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a 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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Cargo.toml`:
- Around line 165-170: The comment in Cargo.toml incorrectly claims
reproducibility via a commit hash while the active dependencies (e.g.,
ruff_python_parser, ruff_python_ast, ruff_text_size, ruff_source_file) are
pinned by tag (tag = "0.15.8-rustpython"); update the file by either adding
explicit rev = "<commit-hash>" entries for those dependencies to truly pin them
to the referenced commit, or change the comment to state that reproducibility
relies on Cargo.lock resolving the tag (and remove the misleading commit-hash
claim); ensure the chosen approach is applied consistently for the referenced
dependency entries and that the comment matches the actual pinning method.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 64a18113-676a-41c2-b4e6-ed0a3868e14d

📥 Commits

Reviewing files that changed from the base of the PR and between 1f6b4c6 and fc7232f.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • Cargo.toml

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Cargo.toml (1)

161-164: version = "0.15.8" uses caret constraint semantics, not an exact pin.

Lines 161–164 specify version = "0.15.8", which Cargo treats as ^0.15.8, allowing any patch version 0.15.x. While Cargo.lock ensures reproducible builds by recording the exact resolved version (0.15.8), using version = "=0.15.8" would make the intent explicit in the manifest and provide clearer documentation for strict versioning on these forked ruff crates.

Suggested improvement
-ruff_python_parser = { package = "rustpython-ruff_python_parser", version = "0.15.8" }
-ruff_python_ast = { package = "rustpython-ruff_python_ast", version = "0.15.8" }
-ruff_text_size = { package = "rustpython-ruff_text_size", version = "0.15.8" }
-ruff_source_file = { package = "rustpython-ruff_source_file", version = "0.15.8" }
+ruff_python_parser = { package = "rustpython-ruff_python_parser", version = "=0.15.8" }
+ruff_python_ast = { package = "rustpython-ruff_python_ast", version = "=0.15.8" }
+ruff_text_size = { package = "rustpython-ruff_text_size", version = "=0.15.8" }
+ruff_source_file = { package = "rustpython-ruff_source_file", version = "=0.15.8" }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Cargo.toml` around lines 161 - 164, The Cargo.toml entries for the four
rustpython forked crates (ruff_python_parser, ruff_python_ast, ruff_text_size,
ruff_source_file) currently use version = "0.15.8" which Cargo treats as a caret
range; change each to an exact pin by replacing version = "0.15.8" with version
= "=0.15.8" for ruff_python_parser, ruff_python_ast, ruff_text_size and
ruff_source_file so the manifest clearly documents the intent to lock to that
exact release.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Cargo.toml`:
- Around line 161-164: The Cargo.toml entries for the four rustpython forked
crates (ruff_python_parser, ruff_python_ast, ruff_text_size, ruff_source_file)
currently use version = "0.15.8" which Cargo treats as a caret range; change
each to an exact pin by replacing version = "0.15.8" with version = "=0.15.8"
for ruff_python_parser, ruff_python_ast, ruff_text_size and ruff_source_file so
the manifest clearly documents the intent to lock to that exact release.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: acc4008d-8b86-4c35-b88d-3ca9346aa8c2

📥 Commits

Reviewing files that changed from the base of the PR and between fc7232f and 17adbde.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • Cargo.toml

@youknowone youknowone merged commit 6826557 into RustPython:main Mar 29, 2026
15 checks passed
@youknowone youknowone deleted the ruff-fork branch March 29, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant