rust-lang / rust-lang/rust-analyzer

Improve the Bootstrap error message when dlls files are missing

Open
#17,619 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-vscode C-feature
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.