Skip to content
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

Merged
merged 3 commits into from
Dec 5, 2024
Merged

Conversation

epage
Copy link
Contributor

@epage epage commented Dec 3, 2024

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

@rustbot
Copy link
Collaborator

rustbot commented Dec 3, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added Command-fix S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 3, 2024
Copy link
Member

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

Thanks!

src/cargo/ops/fix.rs Outdated Show resolved Hide resolved
Copy link
Member

@Rustin170506 Rustin170506 left a 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!

@@ -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
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

@weihanglo weihanglo left a 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!

@weihanglo weihanglo added this pull request to the merge queue Dec 5, 2024
Merged via the queue into rust-lang:master with commit 0b3ad41 Dec 5, 2024
20 checks passed
@epage epage deleted the 2024 branch December 5, 2024 21:49
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 7, 2024
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)
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 8, 2024
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)
@rustbot rustbot added this to the 1.85.0 milestone Dec 8, 2024
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Dec 8, 2024
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)
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Dec 11, 2024
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-fix S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2024 edition migration of default_features doesn't work for virtual workspace inherited dependencies
5 participants