-
Notifications
You must be signed in to change notification settings - Fork 888
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
Components occasionally become corrupted after rustup upgrade #2704
Comments
So this is happening on different OS's? Fascinating bug. This is BinaryNotProvidedByComponent with description "binary should be provided by component but isn't in current toolchain" Next time it happens, lets check the following:
That said, I strongly suspect the problem is: #988 (and you may see / #2417 sometimes as well). |
I got the same bug in macOS and it is only happening in one particular codebase terminal. The error:
I tried updating using
|
Please perform the debugging steps I requested. |
Steps followed:
Thank you for responding |
cargo is not directly executed: you run cargo, but cargo is rustup, rustup the runs the real cargo which is located in the path in the toolchain dir that I gave. If its not there, (and you say it isn't), then the component is either incorrectly unpacked, unpacked but has had elements deleted (e.g. by a virus scanner), or isn't unpacked at all, irrespective of the toolchain config. See if the following repairs it: If so thats pretty strong evidence for the bug with concurrency. How are you normally running rustup? Are you using an editor with rust integration of some sort? |
It worked, cargo is running now :) I use VSCode, I don't recall doing any special rust integration while installing rust. |
@diru1100 how did you trigger the bug? Did you run an update to rust from the CLI? Or from some vscode extension? |
@XAMPPRocky any further insight on this? All the evidence so far is the known concurrency limitations as I mention above. I'd like to close this as a dupe, but I don't want to if there is a good chance its a different cause (e.g. some IO corruption on MacOS X). |
hey @rbtcollins, I got the bug in a specific project directory. Rust was working fine in other terminal windows afaik. First I tried doing I do have these 3 in the toolchains folder if that helps:
|
@rbtcollins Feel free to close as dupe. |
@diru1100 did you have vscode or another IDE open at the time you ran rustup ? |
Yup, the terminal which gave the error was in VSCode.
Not sure about this |
Yeah, we do in our largest projects, and the errors I gave in the original post was from one of those projects. |
@diru1100 I think you may have a different bug then, if you don't have a toolchain file. @XAMPPRocky toolchain files trigger implicit installation. I wonder if something like this is possible: |
@rbtcollins not sure if this is useful, but I came across this when I opened a folder with a Also tried to reproduce by removing the toolchain, and letting rust-analyzer fetch it again, but it doesn't seem to happen every time |
@XAMPPRocky do your teams use an IDE and rust-analyzer by chance? |
Yes, 100% I believe most people are using VS Code with rust-analyzer. |
Duplicate of #988 for sure at this point. |
The error is still not solved even in rust 1.73.0 I get error when using VS Code + rust-analyzer It occurs which i try to compile or build a project and suddenly rust-analyzer decides to do something |
I think I just ran into this while my disk had some problems while doing a cargo update. |
Right, manually |
Maybe rustup could have a Bonus points if it could diagnose the problem and ask the user to send a bug report with that information, but that's maybe a bit extra 🙂. |
Problem
At Embark we usually upgrade to using the latest stable rust compiler soon after its release. We've noticed a consistent spurious issue where your components become corrupted after being upgraded. This happens across different platforms, with different components, and it does not happen to the same install consistently, but we do usually have it happen to at least one or two people on the team every upgrade cycle.
This bug is usually fixed by just re-installing the component or toolchain altogether, so it's not the worst bug, but it is pretty annoying.
Steps
rustup upgrade
Errors
The text was updated successfully, but these errors were encountered: