Repository navigation
chore: remove unused Cargo dependencies - #6732
Conversation
|
ACTION NEEDED The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. For details on the error please inspect the "PR Title Check" action. |
8be0317 to
2eb0f8c
Compare
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
@claude review once |
| lance-namespace-impls = { version = "=7.0.0-beta.7", path = "./rust/lance-namespace-impls" } | ||
| lance-namespace-datafusion = { version = "=7.0.0-beta.7", path = "./rust/lance-namespace-datafusion" } | ||
| lance-namespace-reqwest-client = "0.7.5" |
There was a problem hiding this comment.
🔴 Removing lance-namespace-datafusion from [workspace.dependencies] in Cargo.toml leaves the matching [[tool.bumpversion.files]] entry in .bumpversion.toml (lines 93-96) orphaned. Since the top-level [tool.bumpversion] sets ignore_missing_version = false, the next release run will fail with VersionNotFoundError. Fix by deleting the orphaned bumpversion entry (the per-crate rust/lance-namespace-datafusion/Cargo.toml uses version.workspace = true, so no replacement entry is needed) or by restoring the workspace dep line.
Extended reasoning...
What the bug is
This PR removes the workspace-level dependency declaration for lance-namespace-datafusion from the root Cargo.toml:
-lance-namespace-datafusion = { version = "=7.0.0-beta.7", path = "./rust/lance-namespace-datafusion" }However .bumpversion.toml still contains a per-substring substitution rule that targets exactly that line (lines 93-96):
[[tool.bumpversion.files]]
filename = "Cargo.toml"
search = 'lance-namespace-datafusion = {{ version = "={current_version}"'
replace = 'lance-namespace-datafusion = {{ version = "={new_version}"'Why this breaks release automation
The top-level [tool.bumpversion] block (line 12) explicitly sets:
ignore_missing_version = falsebump-my-version raises VersionNotFoundError when a configured search pattern cannot be found in its target file and ignore_missing_version is false. After this PR the substring lance-namespace-datafusion = { version = "=7.0.0-beta.7" no longer appears anywhere in the root Cargo.toml, so the very next release version bump will abort.
Step-by-step proof
- Apply this PR. The root
Cargo.tomlnow jumps fromlance-namespace-implsstraight tolance-namespace-reqwest-client(nolance-namespace-datafusionworkspace dep). - A release engineer runs
bump-my-version bump minor(or whatever component) at the repo root. bump-my-versioniterates over each[[tool.bumpversion.files]]entry. When it reaches the entry on lines 93-96, it tries to find the substringlance-namespace-datafusion = { version = "=7.0.0-beta.7"inCargo.toml.- The substring is absent. Because
ignore_missing_version = falseis set globally and not overridden on this entry, the tool raisesVersionNotFoundErrorand aborts the bump. - Release is blocked until someone edits
.bumpversion.toml.
Why existing config doesn't prevent it
Each [[tool.bumpversion.files]] entry inherits the top-level ignore_missing_version unless it overrides it; this entry does not override. No CI step in this PR validates .bumpversion.toml against the current Cargo.toml, so the failure only surfaces at release time.
Scope confirmation
The other workspace dep removed by this PR (lance-arrow-stats) has no corresponding bumpversion entry — .bumpversion.toml only configures rules for crates whose version equals current_version (7.0.0-beta.7), and lance-arrow-stats uses 58.0.0. So lance-namespace-datafusion is the only orphaned rule.
The crate rust/lance-namespace-datafusion itself remains a workspace member (still listed in [workspace] members) and its own Cargo.toml uses version.workspace = true, so no per-crate bumpversion rule is required as a replacement.
How to fix
Delete the orphaned [[tool.bumpversion.files]] block at .bumpversion.toml lines 93-96, or restore the workspace dep line in Cargo.toml if removing it was unintentional.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
2eb0f8c to
7a0bbe9
Compare
7a0bbe9 to
b5350fa
Compare
Switch the release publish step from `albertlockett/publish-crates` to `cargo publish --workspace`, which was stabilized in Rust 1.90 and supports `--exclude` natively. Exclude `lance-arrow-stats` and `lance-arrow-scalar` from the per-release publish since they are versioned to track Arrow's major (currently 58.0.0) and released on Arrow's cadence, not Lance's. The previous action aborted the entire run whenever either crate's source changed without a version bump, which is what blocked the v7.0.0 Rust publish (#6732 removed a stale `half` dep from `arrow-stats` after `58.0.0` was published). The `skip_check_repo` workflow_dispatch input is removed since it only configured the previous action. Followup: bump `lance-arrow-stats` to `58.0.1` so its crates.io source matches the workspace tree again, then drop the corresponding `--exclude` from this workflow. Fixes #6971 ## Test plan - [ ] Dispatch `cargo-publish.yml` with `tag: v7.0.0` once this lands; verify all non-excluded workspace crates publish to crates.io Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This cleans up direct Cargo dependency declarations that are no longer referenced across the Rust workspace and the Python/JNI crates.
The generated-code and macro-only dependencies that still need to be declared are kept explicitly ignored for cargo-machete so future scans do not remove required dependencies.