-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add more diagnostics to smooth edition transition #5824
Conversation
r? @matklad (rust_highfive has picked a reviewer for you, use r? to override) |
30488b1
to
e4f447b
Compare
@bors: r+ |
📌 Commit e4f447bfdce4da79c4737c11a1531a50496387a3 has been approved by |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
The previous heuristic for fixing packages was to fix all packages in a workspace, aka those with path dependencies. Instead this commit switches cargo over to only fixing the "primary" package, or those requested on the command line or implicitly via cwd. This will later help us identify which packages are being targeted so we can provide tailored warnings and errors for mixed up transition steps.
e4f447b
to
438e240
Compare
@bors: r+ |
📌 Commit 438e240ee3cf324ffcc8f5565a63d940ea336886 has been approved by |
⌛ Testing commit 438e240ee3cf324ffcc8f5565a63d940ea336886 with merge 47829c0348b83c236339b7fa2353a907e3d52fa1... |
438e240
to
d7f091e
Compare
@bors: r+ |
📌 Commit d7f091e36a77b05b729e293041a7bb0c81277ccb has been approved by |
⌛ Testing commit d7f091e36a77b05b729e293041a7bb0c81277ccb with merge 53c351e98c71fcc6b4184da62bc9b4bdc7e3ad9a... |
💔 Test failed - status-travis |
This commit adds two diagnostics in particular to ease the transition into the 2018 edition. The current transition process is pretty particular and must be done carefully, so let's try to automate things to make it as painless as possible! Notably the new diagnostics are: * If you `cargo fix --prepare-for 2018` a crate which already has the 2018 edition enabled, then an error is generated. This is because the compiler can't prepare for the 2018 edition if you're already in the 2018 edition, the lints won't have a chance to fire. You can only execute `--prepare-for 2018` over crates in the 2015 edition. * If you `cargo fix --prepare-for 2018` and have forgotten the `rust_2018_preview` feature, a warning is issued. The lints don't fire unless the feature is enabled, so this is intended to warn in this situation to ensure that lints fire as much as they can. After this commit if `cargo fix --prepare-for` exits successfully with zero warnings then crates should be guaranteed to be compatible! Closes rust-lang#5778
d7f091e
to
fa7a387
Compare
@bors: r+ |
📌 Commit fa7a387 has been approved by |
Add more diagnostics to smooth edition transition This commit adds two diagnostics in particular to ease the transition into the 2018 edition. The current transition process is pretty particular and must be done carefully, so let's try to automate things to make it as painless as possible! Notably the new diagnostics are: * If you `cargo fix --prepare-for 2018` a crate which already has the 2018 edition enabled, then an error is generated. This is because the compiler can't prepare for the 2018 edition if you're already in the 2018 edition, the lints won't have a chance to fire. You can only execute `--prepare-for 2018` over crates in the 2015 edition. * If you `cargo fix --prepare-for 2018` and have forgotten the `rust_2018_preview` feature, a warning is issued. The lints don't fire unless the feature is enabled, so this is intended to warn in this situation to ensure that lints fire as much as they can. After this commit if `cargo fix --prepare-for` exits successfully with zero warnings then crates should be guaranteed to be compatible! Closes #5778
☀️ Test successful - status-appveyor, status-travis |
This commit adds two diagnostics in particular to ease the transition into the
2018 edition. The current transition process is pretty particular and must be
done carefully, so let's try to automate things to make it as painless as
possible! Notably the new diagnostics are:
If you
cargo fix --prepare-for 2018
a crate which already has the 2018edition enabled, then an error is generated. This is because the compiler
can't prepare for the 2018 edition if you're already in the 2018 edition, the
lints won't have a chance to fire. You can only execute
--prepare-for 2018
over crates in the 2015 edition.
If you
cargo fix --prepare-for 2018
and have forgotten therust_2018_preview
feature, a warning is issued. The lints don't fire unlessthe feature is enabled, so this is intended to warn in this situation to
ensure that lints fire as much as they can.
After this commit if
cargo fix --prepare-for
exits successfully with zerowarnings then crates should be guaranteed to be compatible!
Closes #5778