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

Regression: Diagnostic message getting overwritten by an empty RPC message #25390

Open
kartikvashistha opened this issue Feb 22, 2025 · 0 comments

Comments

@kartikvashistha
Copy link
Contributor

kartikvashistha commented Feb 22, 2025

Summary

Hi team, hope you are all doing well!

I have just discovered a regression in the current main build of Zed, where a diagnostic message sent from an LSP is incorrectly getting overwritten by an empty recieved RPC message. This prevents it from appearing under the diagnostics pane (it actually does appear there momentarily, but disappears immediately after this empty diagnostic message is sent).

Preview of this under LSP logs is as follows:

// Receive:
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///Users/kartik/code/personal/zed-ansible//example/roles/setup-fedora/handlers/main.yml","diagnostics":[{"message":"Too many blank lines (3 > 2)","range":{"start":{"line":10,"character":0},"end":{"line":10,"character":2147483647}},"severity":1,"source":"ansible-lint","code":"yaml[empty-lines]","codeDescription":{"href":"https://ansible.readthedocs.io/projects/lint/rules/yaml/"}},{"message":"All names should start with an uppercase letter.","range":{"start":{"line":11,"character":0},"end":{"line":11,"character":2147483647}},"severity":1,"source":"ansible-lint","code":"name[casing]","codeDescription":{"href":"https://ansible.readthedocs.io/projects/lint/rules/name/"}}]}}
// Receive:
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///Users/kartik/code/personal/zed-ansible/example/roles/setup-fedora/handlers/main.yml","diagnostics":[]}}

This issue is not observed under the current stable release:

Zed: v0.174.6 (Zed) 
OS: macOS 15.3.1
Memory: 32 GiB
Architecture: aarch64

Steps to trigger the problem:

  1. Clone this repo;
  2. Install the Ansbile extension;
  3. Setup the extension per the readme;
  4. Open this file and observe RPC Messages under ansible-language-server logs.

Actual Behavior:
No diagnostic message appears (or more accurately: appears very briefly before being cleared up).

Expected Behavior:
The file should fail linting as all tasks name should be in uppercase, and as such a relevant diagnostic message should appear under the diagnostics pane.

Zed Version and System Specs

Zed: v0.176.0 (Zed Dev 328e4d6)
OS: macOS 15.3.1
Memory: 32 GiB
Architecture: aarch64

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

No branches or pull requests

1 participant