-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Put Searching Parent Directories for Cargo.toml
Behind Logical Gate
#7871
Comments
Cargo.toml
Behind Logical Gate
Just curious if we could chat about this issue? I’m happy to put in a PR :) |
Just want to mention another situation where this “feature” can cause problems. When running cargo in a directory which resides on an NFS mount which is auto mounted, where e.g. /net is the automounter top level. Cargo searches parent directories until it reaches /net/Cargo.toml, which causes automounter to try to find an NFS export for this name. Depending on the config this can take quite some time before it times out. |
This also caused me problems when bringing up It is surprising to me that something in the Rust ecosystem is so vulnerable to environment side-effects when Rust the language is so very tight about that sort of thing. |
rust-lang/rfcs#3279 is also related to this |
Is there any solution for this? On our universities HPC cluster (with 4000+ users), the home directories are mounted via an automounter script in the path /cluster/home/$USER, which basically makes rust unusable:
When cargo tries to access /cluster/home/Cargo.toml, then the automounter tries to mount a home directory for the inexistent user "Cargo.toml", which causes cargo to fail creating any new project. Is there any workaround to make rust usable on systems that use an automounter? |
Could it be a workaround to create an empty Cargo.toml file in $HOME?
|
Describe the problem you are trying to solve
In
cargo-outdated
we are seeing an issue (we build the project under/tmp
) where if there's acargo.toml
that was moved to/tmp/
cargo build will fail.Describe the solution you'd like
Either a seperate
find_root()
(link)that we can trigger fromworkspace::new()
, or a config option to stop the function from crawling upwards (link) in the directory ancestors.Notes
This was mentioned in #4992 (comment)
I understand this is necessary for cargo and it's the intended function; however, using cargo as an API there should be a way to avoid this :)
The text was updated successfully, but these errors were encountered: