You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running cargo check --all in the root of a workspace discards the per-crate cargo configuration. In my case this results in the [build] target = "xxx" being ignored.
Steps
Setup a workspace containing a crate with its own .cargo/config
Run cargo check inside that crate's dir. It successfully uses the config.
Run cargo check --all from the root of the workspace. It fails to use the config.
Possible Solution(s)
Always use the crate's cargo configuration if it exists.
Notes
Output of cargo version:
I think this is a digression but I haven't verified any older versions worked.
cargo 1.40.0-nightly (5da4b4d47 2019-10-28)
The text was updated successfully, but these errors were encountered:
Thanks for the report! This is a duplicate of #2930, so closing in favor of that. Cargo currently only looks at the current directory and up. It indeed can be surprising, but it is a bit difficult to nail down different rules, and can be tricky with backwards compatibility.
Problem
Running
cargo check --all
in the root of a workspace discards the per-crate cargo configuration. In my case this results in the[build] target = "xxx"
being ignored.Steps
.cargo/config
cargo check
inside that crate's dir. It successfully uses the config.cargo check --all
from the root of the workspace. It fails to use the config.Possible Solution(s)
Always use the crate's cargo configuration if it exists.
Notes
Output of
cargo version
:I think this is a digression but I haven't verified any older versions worked.
The text was updated successfully, but these errors were encountered: