Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upcargo fix: Prevent fixing in mixed up transition steps #5778
Comments
alexcrichton
added
the
Command-fix
label
Jul 23, 2018
alexcrichton
added this to the Edition Preview 2 milestone
Jul 23, 2018
This comment has been minimized.
This comment has been minimized.
|
cc @killercup |
alexcrichton
referenced this issue
Jul 26, 2018
Closed
Should the rust_2018_idioms lint group be mentioned in documentation? #52679
alexcrichton
added a commit
to alexcrichton/cargo
that referenced
this issue
Jul 28, 2018
alexcrichton
referenced this issue
Jul 28, 2018
Merged
Add more diagnostics to smooth edition transition #5824
alexcrichton
added a commit
to alexcrichton/cargo
that referenced
this issue
Jul 28, 2018
This comment has been minimized.
This comment has been minimized.
Wanted to share anecdotal support for this feature. When I was doing a transition of a crate, it was very natural to up-arrow in the terminal and pull down my first |
johnthagen
referenced this issue
Jul 28, 2018
Merged
Explicitly mention not passing prepare flag after switching to new edition #69
This comment has been minimized.
This comment has been minimized.
|
Yes currently I'm not sure if we've got the best ergonomics. Another option would be to issue a warning and keep going (without the lint group), but that runs more risk of causing hundreds of errors I think than the annoyance of tweaking arguments. |
This comment has been minimized.
This comment has been minimized.
|
Yeah, I feel like shooting for a "fail-fast" error in this case with a good message would be the best IMO. |
alexcrichton commentedJul 23, 2018
A common problem we're seeing in the 2018 transition is that steps are performed out of order, rendering
cargo fixnot too useful any more! I think we should implement two important fixes incargo fixto remedy the situation:-parguments on the command line.--prepare-foris passed, then an error is generated. You can't prepare for an edition if you're already in the 2018 edition!#![feature(rust_2018_preview)]inside it then we should either warn or fail compilation.This should hopefully fix the bugs of "you enabled the edition too early" or "you forgot to enable the feature gate"!