rustup update did not update certain components properly
Verification
- [x] I searched for recent similar issues at https://github.com/rust-lang/rustup/issues?q=is%3Aissue and found no duplicates.
- [x] I am on the latest version of Rustup according to https://github.com/rust-lang/rustup/tags and am still able to reproduce my issue.
Problem
rustup update updated cargo, cargo-clippy, cargo-fmt, rustc, rustdoc & rustfmt, but did not update/install: rust-analyzer, rust-gbd, rust-gbdgui, rust-lldb properly.
Note: I had to install rust-analyzer manually via rustup component add rust-analyzer (Notice the date modified difference in the screenshot below)
Steps
- Perform
rustup updateto update Rust from previous version (0.19.0 in my case) to 0.19.1.
Possible Solution(s)
No response
Notes
Using latest Visual Studio C++ Build tools
Rustup version
1.91.0
Installed toolchains
stable-x86_64-pc-windows-msvc
OS version
Windows 11 Pro 26100.6899
@HeWhoHeWho Hello, and thanks for the report!
IIRC rustup can detect which components don't need update and as a result it won't update those. This is particularly true for rust-gdb and rust-lldb since they are just direct wrappers over gdb and lldb and hardly need changes.
If you are talking about the fact that they are not shown as executables, maybe there is a problem in the distribution format rather than rustup itself (cc @ChrisDenton for further confirmation regarding the Windows platform; probably related to existing issue: https://github.com/rust-lang/rustup/issues/2838).
As for rust-analyzer I am not quite sure what is happening, but it is true that the default profile doesn't include this component.
It does seem odd to me that rustc is distributing bash shell scripts for the msvc target. Maybe I'm forgetting a reason for doing that but I think it's not going to work in any case because I'm pretty sure it doesn't ship the actual lldb with rustc (which is what the script calls by default).
Ok, it would work if: using a msys2/cygwin shell and you've installed lldb or gdb separately. So yeah, that part is #2838. We'd either need to make rust-gdb (in .cargo/bin) a shell script or try to invoke msys2 manually via rustup. Either option would require some design work. But that's probably better discussed on #2838.
If you are talking about the fact that they are not shown as executables, maybe there is a problem in the distribution format rather than rustup itself (cc @ChrisDenton for further confirmation regarding the Windows platform; probably related to existing issue: #2838).
Yes, that's what I was trying to convey. Noted on the previous report.
As for
rust-analyzerI am not quite sure what is happening, but it is true that the default profile doesn't include this component.
Shouldn't rust-analyzer be part of the default update package to keep it in synced with Rust toolchain?
Some update to share:
I manually removed the rust-analyzer executable & program debug database that I manually added few days ago, the first command rust-analyzer --version output is expected but upon my attempt to have rust-analyzer added again via rustup component add rust-analyzer, it just won't install the binary anymore, claiming rust-analyzer is already up-to-date.
Need some enlightenment here.
PS: Rebooted my system, same command output.
Hi @rami3l @ChrisDenton
The issue with rust-analyzer.exe & rust-analyzer.pdb not installed during rustup update persists when I tried to update Rust to 1.91.1.
I re-ran the whole installation with rustup toolchain remove stable-x86_64-pc-windows-msvc followed by rustup install stable-x86_64-pc-windows-msvc and got the same outcome.
Why didn't rustup update force install them somehow if they're missing from the package?
I am having the same issue on fedora 42! i can download the official rust-analyzer release and run the command just fine but the one packaged with rustup seems to be broken.
@HeWhoHeWho Hmmm I'm really sorry, but I might not have fully understood the whole story.
If you choose to install rust-analyzer via rustup then the idea is that it should be updated normally. The following is an example on my machine using fish shell:
> rustup default nightly
info: using existing install for nightly-aarch64-apple-darwin
info: default toolchain set to nightly-aarch64-apple-darwin
nightly-aarch64-apple-darwin unchanged - rustc 1.93.0-nightly (c871d09d1 2025-11-24)
> rustup component add rust-analyzer
info: downloading component(s)
rust-analyzer installed 7.43 MiB
> ra=(rustup which rust-analyzer) $ra --version
rust-analyzer 1.93.0-nightly (c871d09d 2025-11-24)
############################
> rustup update
[..]
nightly-aarch64-apple-darwin updated - rustc 1.93.0-nightly (1be6b13be 2025-11-26) (from rustc 1.93.0-nightly (c871d09d1 2025-11-24))
> ra=(rustup which rust-analyzer) $ra --version
rust-analyzer 1.93.0-nightly (1be6b13b 2025-11-26)
You can see the version number has changed so it's definitely not the same binary.
OTOH rust-analyzer not being included in the default profile is a whole new issue.
@HeWhoHeWho My suspicion for https://github.com/rust-lang/rustup/issues/4577#issuecomment-3485263583 is that, similar to @JCBurnside, the installation is somehow in an incoherent state and rustup doesn't know how to work on it.
What does ./rust-analyzer --version give? (Don't use rustup to call rust-analyzer but call it directly, like I've done in the above example.) What do you mean by "broken" exactly?
PS: The rustup team is unfortunately not very well-informed of what is available on the release server, since its scope is very much limited to the rustup CLI itself, i.e. what is available in this repo.
My understanding is that, rustup update should automatically update/install latest rust-analyzer as well when there's an update.
Scenario 1:
rustup update to install latest Rust version, rust-analyzer will not appear in ~\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin.
Run rust-analyzer --version will result in rust-analyzer not found (I can't reproduce it now as I've manually installed rust-analyzer via rustup component add rust-analyzer, which brings me to Scenario 2)
Scenario 2:
Similarly, rustup update to install latest Rust version, rust-analyzer will not appear in ~\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin.
Run rustup component add rust-analyzer to manually install rust-analyzer.
Output of rust-analyzer --version:
rust-analyzer 1.91.1 (ed61e7d7 2025-11-07)
@HeWhoHeWho Thanks for your response. Both of your scenarios are valid but are not relevant to your original problem of "updating components".
The idea is that when rust-analyzer is installed before rustup update, rust-analyzer should be updated together with the rest of the toolchain as demonstrated in https://github.com/rust-lang/rustup/issues/4577#issuecomment-3587219291. I believe that is what you'd expect.
Which part of this demonstration did you find problematic on your machine?
Thanks @rami3l.
I double checked my very initial Rust installation (via the recommended rustup-init.exe), rust-analyzer was installed alongside other binaries like cargo.exe, cargo-clippy.exe, cargo-fmt.exe, rustc.exe, rustup.exe, to name a few of the core ones. They can all be found in ~\.cargo\bin dated back on 13 Jul 2025 (installation date), so I'm sure of rust-analyzer.exe was installed in ~\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin.
Fast forward to updating Rust via rustup update, rust-analyzer was missed from installing, and hence rustup component add rust-analyzer was the only choice for me to install it.
Now that I have rust-analyzer installed manually, I presume rustup update would be able to track. Let's keep this in view, I will update again if the issue persists in next update.
@HeWhoHeWho Binaries existing under ~\.cargo\bin DON'T mean these components are installed. Some of those, such as rust-analyzer.exe, are just links to rustup which dynamically dispatches to installed components such as ~\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\rust-analyzer.exe. And, if they turn out to be not installed, rustup will complain.
You have to manually issue rustup component add rust-analyzer to install the component and, once installed, they should be able to be updated normally unless the update isn't available on the release server.