Opened 4 months ago

#68987 assigned defect

rust-analyzer @20231204: Failed to spawn proc-macro servers

Reported by: l2dy (Zero King) Owned by: herbygillot (Herby Gillot)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: rust-analyzer rust-src

Description

Attempting to use rust-analyzer with Eglot returns the following error.

[eglot] Server reports (type=2): Failed to spawn one or more proc-macro servers.

- cannot find proc-macro-srv, the workspace `.../cargo2port` is missing a sysroot
Failed to find sysroot for Cargo.toml file .../cargo2port/Cargo.toml. Is rust-src installed? can't load standard library from sysroot
/opt/local
(discovered via `rustc --print sysroot`)
try installing the Rust source the same way you installed rustc

rust-src seems to install source files under /opt/local/libexec/rust/src, which does not match what rustc --print sysroot returns.

See also https://github.com/rust-lang/rust-analyzer/issues/16001.

Change History (0)

Note: See TracTickets for help on using tickets.