Running multiple cargos simultaneously with linked toolchain under windows
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
Hi,
I've recently been developing an embedded project under windows for the ESP32
As part of this I need to use a custom toolchain and link it in
https://github.com/esp-rs/rust
This all seems to work fine but some tools try to run cargo multiple times at the same time
and under windows if this happens and the toolchain is linked it seems to result in
error: unable to unlink old fallback exe: Access is denied. (os error 5)
This might be related / the same thing I'm not sure
https://github.com/rust-lang/rustup/issues/1137
rust-analyser
In the case of rust-analyser I believe it runs "cargo check" and "cargo metadata"
at the same time while it's scanning the source
https://github.com/rust-analyzer/rust-analyzer/issues/10674
cargo make
With cargo make if I set RUSTUP_TOOLCHAIN="esp" as part of the cargo make script it works fine
If i try and use a rust-toolchain.toml file it seems to fail
[toolchain]
channel = "esp"
The same for directory overrides
rustup details
rustup --version
rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.56.0 (09c42c458 2021-10-18)`
rustup show
Default host: x86_64-pc-windows-msvc
rustup home: C:\Users\ric\.rustup
installed toolchains
--------------------
stable-x86_64-pc-windows-msvc (default)
nightly-x86_64-pc-windows-msvc
esp
installed targets for active toolchain
--------------------------------------
thumbv7em-none-eabihf
x86_64-pc-windows-msvc
active toolchain
----------------
stable-x86_64-pc-windows-msvc (default)
rustc 1.56.0 (09c42c458 2021-10-18)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing concurrent cargo check and cargo metadata runs on Windows with the linked esp toolchain. Compare rust-toolchain.toml and directory overrides with the working RUSTUP_TOOLCHAIN environment variable, using the reported rustup show details as context. Done means concurrent cargo operations no longer produce the access-denied fallback-executable error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100