rust-lang / rust-lang/rust-analyzer
Improve the Bootstrap error message when dlls files are missing
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Hi. I am on Windows 10 using rust-analyzer with VS Code. It seems that when the language server is unable to start due to a missing of dll file, the error message displayed is still
Bootstrap error Error: `config.server.path` or `config.serverPath` has been set explicitly. Consider removing this config or making a valid server binary available at that path.
which is quite confusing.
The dll file missing is VCRUNTIME140.dll which is in Visual C++ Redistributable. This is probably a relatively rare problem due to the way I installed rust. My Windows 10 is almost newly installed (just updated to 22H2 from 19xx (I forgot) many installed stuffs are lost), and I have MinGW-w64 toolchain installed and in my PATH, so I choose to not install Visual C++ prerequisites (targeting the GNU ABI) when I was using rustup-init.exe to install rust.
Although the reason is quite straightforward, it did take hours of time for a newbie like me to finally realize it T_T.
Though this may be rare, consider throw more accurate error instead of `config.server.path` or `config.serverPath` has been set explicitly when dll files are missing on Windows? Sorry if this issue is inappropriate.
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
No file or test is named. Start by tracing the rust-analyzer Bootstrap error shown when the server cannot start on Windows, then reproduce the missing VCRUNTIME140.dll case described here. Done means the error identifies the missing DLL or prerequisite instead of reporting only the explicit server-path configuration message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100