-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Duplicate rustflags should be de-duplicated #13774
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
Possibly shares subjects with #5376 but is not exactly the same problem. |
So it sounds like you have
Is that right? is there a reason you do both configs, rather than just the workspace config? As for de-duplicating, to do that would require us to have knowledge of rustc's CLI
Most CLIs are not written in a way to be able to reuse the same definition for parsing as de-duplicating, so we'd have to fork their CLI and keep it in sync. |
Exactly.
The
I understand that what I'm asking is far from trivial |
why are you using workspace and not CARGO_TARGE_DIR @StealthyKamereon ? i understand one reason may be that you do not get the binaries easy enough - there is an unstable flag since 5 years: #6790. |
Problem
I have a crate with a
.cargo/config.toml
to enable tracing unstable features:However I use this crate as part of a workspace. So I also put the previous config.toml in my workspace
.cargo/config.toml
.Now everytime I save, rust-analyzer build every crate if I did a cargo check in the crate directory.
I found that it's because the rustflags are not merged properly:
Steps
.cargo/config.toml
:foo
and put the following content infoo/.cargo/config.toml
:cargo check
in the workspace and in thefoo
crate are rebuilding every crate instead of using previously built ones.Possible Solution(s)
When appending rustflags, check for possible duplicates to avoid multiple same values counting as different ones.
Notes
No response
Version
The text was updated successfully, but these errors were encountered: