Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal: Treat cfg fetching failures as a warning #18994

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Wilfred
Copy link
Contributor

@Wilfred Wilfred commented Jan 21, 2025

If the user doesn't have rustc on $PATH, rust-analyzer won't be able to run rustc --print cfg. This isn't really an error, as rust-analyzer can still proceed without it.

This is particularly noticeable when loading crates defined in a rust-project.json. Until the configuration is loaded, the opened files are briefly treated as detached files and users see this error.

Environments with rust-project.json generally have a sysroot and rustc elsewhere, so the error confuses users.

If the user doesn't have rustc on $PATH, rust-analyzer won't be able
to run `rustc --print cfg`. This isn't really an error, as
rust-analyzer can still proceed without it.

This is particularly noticeable when loading crates defined in a
rust-project.json. Until the configuration is loaded, the opened files
are briefly treated as detached files and users see this error.

Environments with rust-project.json generally have a sysroot and rustc
elsewhere, so the error confuses users.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 21, 2025
Copy link
Contributor

@davidbarsky davidbarsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but will ask someone else to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants