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
Placing a .cargo directory (with a cargo config file) in the root of a crate can configure cargo. However, when a crate has the following form:
/
Cargo.toml (has [worspace] with members a and b
a/
Cargo.toml
src/
b/
Cargo.toml
src/
.cargo
config
the .cargo config in b is not used, which is not what I expected. There may be a very good reason for disallowing, but I couldn't find it. Is this expected or unexpected behavior?
I'm not entirely sure if we should support this (even though it is something I could use). The docs also don't list subcrates under the list of directories cargo looks in. Maybe it would be nice to explicitly state that subcrates are not included.
Alternatively, we could support this. I'm not sure what the technical limitations of supporting this are, maybe people with more knowledge about cargo internals could help with this.
Notes
In some sense, this may not be considered a bug, and more of a feature request. Feel free to reclassify it as such.
Yea, this is currently expected behavior. Cargo searches for config files based on the current working directory where it is launched. I understand that can be potentially confusing. I'm going to close this in favor of #9769.
Problem
Placing a
.cargo
directory (with a cargo config file) in the root of a crate can configure cargo. However, when a crate has the following form:the .cargo config in b is not used, which is not what I expected. There may be a very good reason for disallowing, but I couldn't find it. Is this expected or unexpected behavior?
Steps
Create a project conform the template in the above section. I created a git repository demonstrating the bug: https://github.com/jonay2000/cargo-bug
Possible Solution(s)
I'm not entirely sure if we should support this (even though it is something I could use). The docs also don't list subcrates under the list of directories cargo looks in. Maybe it would be nice to explicitly state that subcrates are not included.
Alternatively, we could support this. I'm not sure what the technical limitations of supporting this are, maybe people with more knowledge about cargo internals could help with this.
Notes
In some sense, this may not be considered a bug, and more of a feature request. Feel free to reclassify it as such.
Version
The text was updated successfully, but these errors were encountered: