Workspace has sysroot errors: missing a core library
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- build-system, tooling
Research direction
Start with the bazel run @rules_rust//tools/rust_analyzer:setup -- vscode workflow and the generated rust-analyzer sysroot at the path shown in the report. Investigate why the sysroot appears to lack core and why rust-analyzer suggests rustup in a Bazel-only setup; done means the warning is either reliably reproduced and explained or no longer appears incorrectly.
Written by the indexing model from the issue text.
Description
Description
I'm using
bazel run @rules_rust//tools/rust_analyzer:setup -- vscode
to populate the rust-analyzer shims. I'm driving them from Emacs, and today I noticed a new message I haven't seen before:
[eglot] Server reports (type=2): Workspace
/Users/mg/src/monorepohas sysroot errors: sysroot at/private/var/tmp/_bazel_mg/89452110e8744fab7faf12b87814819e/external/rules_rust++rust+rust_analyzer_1.95.0_tools/lib/rustlib/src/libraryis missing acorelibrary, try runningrustup component add rust-srcto possibly fix this [3 times]
Reproduction steps
I'm unfortunately not sure how to reproduce this. Despite the error, I am still able to jump to definition.
I restarted my Emacs, re-opened a Rust file in my checkout and I didn't get the error this time. I can jump around, even into stdlib, and still no error.
So I'm mostly recording it here in case others see it.
Impact
It seems this doesn't actually impact the functionality.
It is confusing, though, especially the message about running rustup which is not applicable to a Bazel-only workflow 😄
Bazel and rules_rust version
Bazel 9.1.1, rules_rust 0.73.0
- Dominant language
- Starlark
- Stars
- 857
- Forks
- 701
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 46
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from bazelbuild/rules_rust
-
`rust_test(crate = ...)` does not stage the crate's transitive dynamic libraries into runfilesPossibly taken @Wito-1 claimed this 65 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
bazelbuild/rules_rust#4309 ·
Maintainers usually reply within 3 days
-
Windows (no-symlink path): drain_runfiles_dir_windows deletes retained runfiles — inverted filename_suffixes_to_retain conditionPossibly taken @Mattbusel claimed this 17 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
bazelbuild/rules_rust#4266 ·
Maintainers usually reply within 3 days
-
rust.toolchain(strip_level = ...) is silently ignoredPossibly taken @Mattbusel claimed this 17 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
bazelbuild/rules_rust#4223 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
bazelbuild/rules_rust#4152 · 1 reaction ·
Maintainers usually reply within 3 days
-
awaiting-response
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bazelbuild/rules_rust#3599 · 1 comment ·
Maintainers usually reply within 3 days
All issues in bazelbuild/rules_rust
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
bazelbuild/apple_support#707 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
out-of-date
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
CachyOS/CachyOS-PKGBUILDS#2232 ·
Maintainers usually reply within 1 day
-
blast/large refactor risk/low spend-dem
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
chriskelly/MusicWall#87 · 2 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
neilotoole/sq#1503 ·
Maintainers usually reply within 1 day