-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo-install: build directory should be in $TEMPDIR #2606
Comments
The problem with tempdirs is that if you ctrl-c they end up lying around and they're hard to find to remove. I wonder though if Cargo could just try a few locations? For example if Although I guess it's just amounting to a tempdir that's slightly more readable... Meh, I guess just using a tempdir seems fine to me! |
…ctory and each cargo-install instance creates and uses its own build directory. This allows running several cargo-install instances in parallel. If we fail to create a temporary directory for whatever reason fallback to creating and using a target-install directory in the current directory. closes rust-lang#2606
cargo-install: prefer building artifacts in the system temporary directory and each cargo-install instance creates and uses its own build directory. This allows running several cargo-install instances in parallel. If we fail to create a temporary directory for whatever reason fallback to creating and using a target-install directory in the current directory. closes #2606 --- r? @alexcrichton Qs: - Should we preserve the current behavior (`target-install` in `cwd`) as a fallback or remove it and error if we can't create a `TempDir` in `env::temp_dir()`? (we currently error if we can't create `target-install` directory in `cwd`) - Should I add tests for the issues I raised at #2606? If yes, how can I test `cargo-install` parallelism? Lack of "Blocking waiting for file lock on build directory" in the output of the `cargo` commands? or something else?
and each instance of
cargo-install
should have its own build directory.Right now
cargo-install
uses atarget-install
directory in$PWD
. So you run into issues like these:You don't have permission to write to
$PWD
:Calling
cargo install
multiple times from the same directory will build each crate sequentially instead of in parallel (because the build directory gets locked -- without the lock things would be worse, so removing the lock is not a solution)If the build directory was
$(mktemp -d)
then you wouldn't have problem callingcargo install
from a directory you don't permission to write to, and you could spawn severalcargo install
(from the same directory) that actually run in parallel.Thoughts?
The text was updated successfully, but these errors were encountered: