Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

RLS fails to start in multi-project setup on non-OS drive #713

Closed
@ghost

Description

The VS Code error message: Could not spawn RLS: `spawn C:\WINDOWS\system32\cmd.exe ENOENT`

Setting "rust-client.enableMultiProjectSetup" to false in settings.json prevents the issue.

Only occurs when running in a workspace folder on a different disk drive than the Windows OS drive.
In my case, Windows is installed to C:, and I'm attempting to work in D:\projects\foo.

Example directory structure:

  • D:\projects\foo
    • bar\
      • src\
        • main.rs
      • Cargo.toml
    • baz\
      • src\
        • main.rs
      • Cargo.toml

https://github.com/rust-lang/rls-vscode/blob/c85bf69f3a00184ee4600da34e6387178eba754c/src/extension.ts#L454
I noticed cwd here is set to "\projects\foo", without the drive letter.

settings.json:

"rust-client.enableMultiProjectSetup": true
"rust-client.channel": "stable"
PS D:\projects\foo> rustup -V
rustup 1.20.2 (13979c968 2019-10-16)

PS D:\projects\foo> rustup show
Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\...\.rustup

installed toolchains
--------------------

stable-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc

active toolchain
----------------

stable-x86_64-pc-windows-msvc (default)
rustc 1.39.0 (4560ea788 2019-11-04)

PS D:\projects\foo> code -v
1.40.2
f359dd69833dd8800b54d458f6d37ab7c78df520
x64

PS D:\projects\foo> code --list-extensions --show-versions | rg rust
[email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions