Skip to content

Figure out how to force cargo fix to run #5736

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
alexcrichton opened this issue Jul 17, 2018 · 4 comments · Fixed by #5944
Closed

Figure out how to force cargo fix to run #5736

alexcrichton opened this issue Jul 17, 2018 · 4 comments · Fixed by #5944
Assignees
Milestone

Comments

@alexcrichton
Copy link
Member

Moved over from rust-lang/rustfix#79, I hear @killercup has a fix in mind!

@alexcrichton alexcrichton added this to the Edition Preview 2 milestone Jul 17, 2018
@killercup killercup self-assigned this Jul 17, 2018
killercup added a commit to killercup/cargo that referenced this issue Jul 24, 2018
Assume you run `cargo fix` and only get warnings that cannot be fixed.
Then, without changing the code, you run `cargo fix` again. The compiler
will see that no files have changed and output… nothing. This is very
confusing to the end user.

To mitigate this, we now `touch` the entry point files to trick
rustc/cargo into emitting the same warnings again.

This is a fix but a very "WIP" one for rust-lang#5736
@alexcrichton
Copy link
Member Author

Bumping this to the RC1 milestone

@nrc
Copy link
Member

nrc commented Aug 29, 2018

ping @killercup are you still planning to work on this?

@alexcrichton
Copy link
Member Author

I sort of forget the original rationale for this, but one articulation of a use case is:

  • First, run cargo fix --edition
  • Realize that you have a ton of warnings, and it turns out that cargo fix has a bug in it. A big message was printed at the top indicating so, and you'd like to see it again.
  • Rerun cargo fix --edition and this time redirect the output to a file so you can read over it later

The second fix doesn't actually do anything!

@dwijnand
Copy link
Member

Looks like #5944 might be doing the trick.

bors added a commit that referenced this issue Aug 31, 2018
Force `cargo fix` to rebuild

Fixes #5736

This is a resubmit of @killercup's #5750, rebased on current master.

@alexcrichton From browsing the code I feel like `-p` would still restrict the packages to rebuild, despite the rebuild flag added. But I might be misreading or not-fully-reading the code. Could you give me some mentoring instructions for the test cases you're concerned with?
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants