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
Executing the cargo build command on my stable toolchain, on a different terminal updated my stable toolchain with rustup update stable. This caused my build to panic with an error getting hold of core functions, which happened just after the rust-std update.
I have tried this on both my macosx and windows machine, attached a screenshot below (from windows machine):
Steps
Required an outdated stable branch, and that branch being used for any compilation and execution
(In my case) Start compiling a project which might take a little longer than the update process
parallelly update the stable branch while the compilation is underway.
This will break the compilation
Possible Solution(s)
considering cargo, rustc, rustfmt are stateless functions, we can consider having a lock file, which gets created when the specific function is invoked, this lock file, however, will not prevent the executable from executing but will prevent any program, in this case, rustup to remove and/or update it, until the lock file is removed.
To allow multiple executions, if anyone wants to use these executables, we can create n lock files for every pid that is using the program, and will only allow rustup to tamper with them if there is no lock file present.
Notes
If possible I would like to work on solving this issue. Though the solution that I have might be a bit vague, any inputs on a different approach are welcome. In the mean time, I'll try to understand the internal workings of rustup.
@NishantJoshi00 please do discuss this in #988 - that bug is quite large, because its a complex topic, but it is the place where we are discussing what a solution looks like.
Problem
Executing the
cargo build
command on my stable toolchain, on a different terminal updated my stable toolchain withrustup update stable
. This caused my build to panic with an error getting hold ofcore
functions, which happened just after therust-std
update.I have tried this on both my
macosx
andwindows
machine, attached a screenshot below (fromwindows
machine):Steps
Possible Solution(s)
considering
cargo
,rustc
,rustfmt
are stateless functions, we can consider having a lock file, which gets created when the specific function is invoked, this lock file, however, will not prevent the executable from executing but will prevent any program, in this case,rustup
to remove and/or update it, until the lock file is removed.To allow multiple executions, if anyone wants to use these executables, we can create
n
lock files for every pid that is using the program, and will only allowrustup
to tamper with them if there is no lock file present.Notes
If possible I would like to work on solving this issue. Though the solution that I have might be a bit vague, any inputs on a different approach are welcome. In the mean time, I'll try to understand the internal workings of
rustup
.Rustup version
rustup 1.26.0 (5af9b9484 2023-04-05)
Installed toolchains
The text was updated successfully, but these errors were encountered: