-
Notifications
You must be signed in to change notification settings - Fork 13.3k
If you set RUSTFLAGS, change a file, and run cargo, all dependencies are pulled again #87670
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
Comments
Warnings in dependencies are already surpressed. They're rebuilt because cargo doesn't know whether your flags will affect the dependent crates, it doesn't inspect the flags to see if you're passing a --cfg or a lint level. Anyway, this should be a cargo issue, there's nothing rustc can do. |
If you only want to set flags for one crate, you can use |
I'm not talking about the first time, I'm talking about after that. I set flags, change file, run cargo, things get rebuilt. I change another file, run cargo and things get rebuilt again. |
This is a known Cargo limitation, see rust-lang/cargo#9055 |
It happens not just when you set the flags the first time, but on every recompile after you set the flags. |
I can't reproduce that, but that should also be filed over at https://github.com/rust-lang/cargo |
I set
export RUSTFLAGS=-Awarmings
in order to suppress warnings (including those from dependencies). If I then runcargo build
things work as expected (cargo runs terminates a hitch). However if I change a single file file in the current project, all dependencies are pulled and recompiled again. The expected behavior is that that only the current project would be checked.I'm on nightly (2021-07-30).
The text was updated successfully, but these errors were encountered: