-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(fix): Migrate workspace dependencies #14890
Conversation
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.
Thanks!
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.
rest LGTM.
Thank you!
src/cargo/ops/fix.rs
Outdated
@@ -252,6 +252,59 @@ fn check_version_control(gctx: &GlobalContext, opts: &FixOptions) -> CargoResult | |||
} | |||
|
|||
fn migrate_manifests(ws: &Workspace<'_>, pkgs: &[&Package]) -> CargoResult<()> { | |||
// HACK: Duplicate workspace migration logic between virtual manifests and real manifests to | |||
// reduce duplicate messages being reported to the user |
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.
I'm not sure what kind of duplication message you're referring to here.
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.
I've made the comment more explicit
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.
The duplicate doesn't look too bad. Thanks!
And thanks for the review from @Rustin170506 as well!
Update cargo 6 commits in 05f54fdc34310f458033af8a63ce1d699fae8bf6..20a443231846b81c7b909691ec3f15eb173f2b18 2024-12-03 03:14:12 +0000 to 2024-12-06 21:56:56 +0000 - fix(fingerprint): Don't throwaway the cache on RUSTFLAGS changes (rust-lang/cargo#14830) - fix(build-rs)!: Remove meaningless 'cargo_cfg_debug_assertions' (rust-lang/cargo#14901) - docs(fingerprint): cargo-rustc extra flags do not affect the metadata (rust-lang/cargo#14898) - fix(add): Don't select yanked versions when normalizing names (rust-lang/cargo#14895) - fix(fix): Migrate workspace dependencies (rust-lang/cargo#14890) - test(build-std): make mock-std closer to real world (rust-lang/cargo#14896)
Update cargo 6 commits in 05f54fdc34310f458033af8a63ce1d699fae8bf6..20a443231846b81c7b909691ec3f15eb173f2b18 2024-12-03 03:14:12 +0000 to 2024-12-06 21:56:56 +0000 - fix(fingerprint): Don't throwaway the cache on RUSTFLAGS changes (rust-lang/cargo#14830) - fix(build-rs)!: Remove meaningless 'cargo_cfg_debug_assertions' (rust-lang/cargo#14901) - docs(fingerprint): cargo-rustc extra flags do not affect the metadata (rust-lang/cargo#14898) - fix(add): Don't select yanked versions when normalizing names (rust-lang/cargo#14895) - fix(fix): Migrate workspace dependencies (rust-lang/cargo#14890) - test(build-std): make mock-std closer to real world (rust-lang/cargo#14896)
Update cargo 6 commits in 05f54fdc34310f458033af8a63ce1d699fae8bf6..20a443231846b81c7b909691ec3f15eb173f2b18 2024-12-03 03:14:12 +0000 to 2024-12-06 21:56:56 +0000 - fix(fingerprint): Don't throwaway the cache on RUSTFLAGS changes (rust-lang/cargo#14830) - fix(build-rs)!: Remove meaningless 'cargo_cfg_debug_assertions' (rust-lang/cargo#14901) - docs(fingerprint): cargo-rustc extra flags do not affect the metadata (rust-lang/cargo#14898) - fix(add): Don't select yanked versions when normalizing names (rust-lang/cargo#14895) - fix(fix): Migrate workspace dependencies (rust-lang/cargo#14890) - test(build-std): make mock-std closer to real world (rust-lang/cargo#14896)
Update cargo 6 commits in 05f54fdc34310f458033af8a63ce1d699fae8bf6..20a443231846b81c7b909691ec3f15eb173f2b18 2024-12-03 03:14:12 +0000 to 2024-12-06 21:56:56 +0000 - fix(fingerprint): Don't throwaway the cache on RUSTFLAGS changes (rust-lang/cargo#14830) - fix(build-rs)!: Remove meaningless 'cargo_cfg_debug_assertions' (rust-lang/cargo#14901) - docs(fingerprint): cargo-rustc extra flags do not affect the metadata (rust-lang/cargo#14898) - fix(add): Don't select yanked versions when normalizing names (rust-lang/cargo#14895) - fix(fix): Migrate workspace dependencies (rust-lang/cargo#14890) - test(build-std): make mock-std closer to real world (rust-lang/cargo#14896)
What does this PR try to resolve?
Technically, the edition doesn't affect the workspace. We could adjust this as we're inheriting to not be a problem.
But it feels weird to keep this around in newer editions. We could frame this as around the what the package is, including inheritance. The nice thing is that default-features works for all versions that inheritance works so we're not forcing the users hand with multiple editions in a workspace.
Fixes #14886
How should we test and review this PR?
Additional information