-
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): Address problems with implicit -> explicit feature migration #14018
Conversation
We already have a test that covers each dep type; we don't need to cover that here.
r? @weihanglo rustbot has assigned @weihanglo. Use |
let Some(activations) = activations.as_array_mut() else { | ||
let _ = gctx.shell().warn(format_args!("skipping fix of feature `{feature_name}` in package `{}`: unsupported feature schema", pkg.name())); | ||
continue; |
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.
This check was written with rust-lang/rfcs#3416 in mind
That syntax is likely to work on any Edition and if we forget to touch this code, I'd prefer to make that known so people can report it to us and we can fix it rather than silently ignoring it.
The question that remains is to warn or error. I figured we shouldn't block the user from getting other fixes for something they can't workaround in a reasonable way.
8a02016
to
21c0928
Compare
Thanks! @bors r+ |
☀️ Test successful - checks-actions |
Update cargo 13 commits in a1f47ec3f7cd076986f1bfcd7061f2e8cb1a726e..3ed207e416fb2f678a40cc79c02dcf4f936a21ce 2024-06-15 01:10:07 +0000 to 2024-06-18 19:18:22 +0000 - test: prefer raw string for regex reduction (rust-lang/cargo#14099) - test: migrate tree and tree_graph_features to snapbox (rust-lang/cargo#14094) - test: Migrate some files to snapbox (rust-lang/cargo#14069) - remove some legacy public dependency code from the resolver (rust-lang/cargo#14090) - fix(fix): Address problems with implicit -> explicit feature migration (rust-lang/cargo#14018) - refactor: 1.79 cleanup (rust-lang/cargo#14088) - test: migrate `git_(gc|shallow)` to snapbox (rust-lang/cargo#14087) - test: migrate timings_works to snapbox (rust-lang/cargo#14082) - test: migrate minimal_versions to snapbox (rust-lang/cargo#14080) - Remove `run_expect_error` to avoid tests incorrectly passing (rust-lang/cargo#14078) - test: migrate help to snapbox (rust-lang/cargo#14060) - test: Migrate tests/testsuite/co*.rs to snapbox (rust-lang/cargo#14079) - Use `std::fs::absolute` instead of reimplementing it (rust-lang/cargo#14075) <!-- r? ghost -->
This doesn't revert the last commit of rust-lang#14018 so that it works properly on Editions 2021 and 2024. Fixes rust-lang#14016
This doesn't revert the last commit of rust-lang#14018 so that it works properly on Editions 2021 and 2024. Fixes rust-lang#14016
This doesn't revert the last commit of rust-lang#14018 so that it works properly on Editions 2021 and 2024. Fixes rust-lang#14016
What does this PR try to resolve?
Within the scope of
cargo fix
there are two problemsCargo.toml
isn't parseable because the unused optional dependency won't "exist" if justdep_name/feature_name
is usedFixes #14010
How should we test and review this PR?
As for the unused optional dependency not "existing" error,
Depending on what solution we go with for #14016, we might want to revisit the second migration within this PR. This is one reason I made the commit separate (in addition to just making it clearer whats happening as this gets into some finer details of features).
Additional information