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

Diagnostics relatedInformation contain invalid URLs #2095

Closed
krobelus opened this issue Nov 27, 2024 · 0 comments · Fixed by #2096
Closed

Diagnostics relatedInformation contain invalid URLs #2095

krobelus opened this issue Nov 27, 2024 · 0 comments · Fixed by #2096
Labels
bug Something isn't working

Comments

@krobelus
Copy link

krobelus commented Nov 27, 2024

Zig Version

latest

ZLS Version

latest

Client / Code Editor / Extensions

kakoune

Steps to Reproduce and Observed Behavior

Open a Zig file containing

pub fn main() void {}
pub fn main() void {}

zig-lsp sends diagnostics with "uri":"/" which seems invalid?

For more details, see the original report at kakoune-lsp/kakoune-lsp#811

Expected Behavior

"uri"://file/path/to/file.zig"

Relevant log output

LSP: DEBG From server zls: {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///tmp/afac/main.zig","diagnostics":[{"range":{"start":{"line":0,"character":7},"end":{"line":0,"character":11}},"severity":1,"code":"ast-check","source":"zls","message":"duplicate struct member name 'main'","relatedInformation":[{"location":{"uri":"/","range":{"start":{"line":1,"character":7},"end":{"line":1,"character":11}}},"message":"duplicate name here"},{"location":{"uri":"/","range":{"start":{"line":0,"character":0},"end":{"line":0,"character":3}}},"message":"struct declared here"}]}]}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant