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

feat(lsp): more information on LSP errors #509

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

edevil
Copy link
Contributor

@edevil edevil commented Sep 18, 2024

When the rust-analyzer server emits errors or warnings, display the additional message. Don't de-duplicate messages otherwise we loose the feedback on whether we have solved the issue.

Copy link
Contributor

Review Checklist

Does this PR follow the Contribution Guidelines? Following is a partial checklist:

Proper conventional commit scoping:

  • For example, fix(lsp): some lsp-related bugfix

  • Pull request title has the appropriate conventional commit prefix.

If applicable:

  • Tested
    • Tests have been added.
    • Tested manually (Steps to reproduce in PR description).
  • Updated documentation.
  • Updated CHANGELOG.md

@edevil edevil changed the title feat(lsp): more information on LSP errors (#508) feat(lsp): more information on LSP errors Sep 18, 2024
Copy link
Owner

@mrcjkb mrcjkb left a comment

Choose a reason for hiding this comment

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

  • Just needs a changelog entry in a [Unreleased] section.

lua/rustaceanvim/server_status.lua Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
lua/rustaceanvim/config/internal.lua Outdated Show resolved Hide resolved
lua/rustaceanvim/server_status.lua Outdated Show resolved Hide resolved
lua/rustaceanvim/server_status.lua Outdated Show resolved Hide resolved
lua/rustaceanvim/server_status.lua Outdated Show resolved Hide resolved
When the rust-analyzer server emits errors or warnings,
display the additional message. Don't de-duplicate messages
otherwise we loose the feedback on whether we have solved
the issue.
@mrcjkb mrcjkb merged commit 4786724 into mrcjkb:master Sep 19, 2024
5 checks passed
@mrcjkb
Copy link
Owner

mrcjkb commented Sep 23, 2024

@edevil since this PR, I sometimes get spammed with warnings like:

cargo check failed to start: Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(unix_wait_status(25856))):
    Blocking waiting for file lock on package cache
    Updating crates.io index
error: failed to write /nix/store/5dh2vfghjizfwgci0z00hbrpx5vwv6zc-rust-lib-src/std/Cargo.lock

Caused by:
  failed to open: /nix/store/5dh2vfghjizfwgci0z00hbrpx5vwv6zc-rust-lib-src/std/Cargo.lock

Caused by:
  Read-only file system (os error 30)

Failed to read Cargo metadata with dependencies for `/nix/store/5dh2vfghjizfwgci0z00hbrpx5vwv6zc-rust-lib-src/std/Cargo.toml`: Failed to run `cd "/
nix/store/5dh2vfghjizfwgci0z00hbrpx5vwv6zc-rust-lib-src/std" && RUSTUP_TOOLCHAIN="/nix/store/p024jn1sd4pn33lg0kaqxh7j2sp1iw7x-rustc-1.80.1" "/nix/s
tore/c0r47wb8xm1dbsvppw6gh75jfjakal1y-cargo-1.80.1/bin/cargo" "metadata" "--format-version" "1" "--all-features" "--manifest-path" "/nix/store/5dh2
vfghjizfwgci0z00hbrpx5vwv6zc-rust-lib-src/std/Cargo.toml" "--filter-platform" "x86_64-unknown-linux-gnu"`: `cargo metadata` exited with an error:
   Updating crates.io index
error: failed to write /nix/store/5dh2vfghjizfwgci0z00hbrpx5vwv6zc-rust-lib-src/std/Cargo.lock

Caused by:
  failed to open: /nix/store/5dh2vfghjizfwgci0z00hbrpx5vwv6zc-rust-lib-src/std/Cargo.lock

Caused by:
  Read-only file system (os error 30)
Run ':RustLsp logFile' for details.
Press ENTER or type command to continue

I think we might need to disable warnings when the server health level is warning by default,
with an config to enable them.
This is far too noisy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants