lapce / lapce/lapce-rust

Wrong rustc if rust is installed in both for rustup and from the package manager on linux

Open
#14 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
87
Forks
30
PR merge metrics
No merged PRs in 30d

Description

The rust plugin tries to use rustc installed from the package manager, instead of the one from rustup. I noticed this because on the system's one I didn't have rust-src installed and rust-analyzer was complaining about that.

I can confirm that the rustup version is the active one, by running rustc --print sysroot from the same shell that I launched the lapce.

In any other editor I don't face this issue using rust-analyzer (ie. kakoune/helix).

OS: Archlinux
Lapce version: 0.2.3
Lapce-rust version: 0.2.3

Contributor guide

No contributing guide indexed for this repository

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

Reproduce on Arch Linux with Rust installed through both rustup and the package manager, launching Lapce from the same shell. Start by tracing how the Rust plugin selects rustc for rust-analyzer; done means it uses the active rustup toolchain, including its rust-src component, rather than the package-manager installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.