Skip to content

fix lock file fixing#298

Merged
fslabs-bot[bot] merged 1 commit intomainfrom
ad/fix-lock
Mar 6, 2026
Merged

fix lock file fixing#298
fslabs-bot[bot] merged 1 commit intomainfrom
ad/fix-lock

Conversation

@atlv24
Copy link
Copy Markdown
Contributor

@atlv24 atlv24 commented Mar 6, 2026

CrateGraph::new_recursive was using the directory where a Cargo.toml was found as the workspace path. When a crate is a member of a parent workspace, cargo metadata resolves the workspace root to the parent — but the workspace entry was still created at the member's path. This caused fix-lock-files --check to look for Cargo.lock in member directories instead of the actual workspace root, producing false "out of sync" errors for lock files that don't (and shouldn't) exist.

Now uses metadata.workspace_root as the workspace path, deduplicates entries that resolve to the same root, and tracks lock file side effects at the correct path.

@fslabs-bot fslabs-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 6, 2026
@atlv24 atlv24 mentioned this pull request Mar 6, 2026
@fslabs-bot
Copy link
Copy Markdown

fslabs-bot bot commented Mar 6, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: loispostula

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fslabs-bot fslabs-bot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 6, 2026
@fslabs-bot fslabs-bot bot merged commit 5c7997c into main Mar 6, 2026
2 checks passed
@fslabs-bot fslabs-bot bot deleted the ad/fix-lock branch March 6, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants