Workspace has sysroot errors: missing a core library

Đang mở
#4,222 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
rust
Lĩnh vực
build-system, tooling

Hướng nghiên cứu

Bắt đầu với workflow bazel run @rules_rust//tools/rust_analyzer:setup -- vscode và sysroot rust-analyzer được tạo tại đường dẫn hiển thị trong báo cáo. Điều tra lý do sysroot có vẻ thiếu core và lý do rust-analyzer đề xuất rustup trong một thiết lập chỉ dùng Bazel; được xem là hoàn tất khi cảnh báo được tái hiện và giải thích một cách đáng tin cậy hoặc không còn xuất hiện không chính xác.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

needs-triage rust-analyzer

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/monorepo has sysroot errors: sysroot at /private/var/tmp/_bazel_mg/89452110e8744fab7faf12b87814819e/external/rules_rust++rust+rust_analyzer_1.95.0_tools/lib/rustlib/src/library is missing a core library, try running rustup component add rust-src to 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

Ngôn ngữ chính
Starlark
Star
857
Fork
701
Merge trung bình
4 ngày 7 giờ
Pull request đã merge (30 ngày)
46

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bazelbuild/rules_rust

Tất cả issue của bazelbuild/rules_rust

Issue tương tự

Thêm issue về Build System

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.