Skip to content

x/tools/gopls: missing workspace diagnostics after protocol change #73501

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

Open
findleyr opened this issue Apr 25, 2025 · 5 comments
Open

x/tools/gopls: missing workspace diagnostics after protocol change #73501

findleyr opened this issue Apr 25, 2025 · 5 comments
Labels
BugReport Issues describing a possible bug in the Go implementation. gopls Issues related to the Go language server, gopls. release-blocker Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@findleyr
Copy link
Member

After https://go.dev/cl/649455, I don't get diagnostics in my LSP client (coc.nvim) for files other than the current open file.

Before that change, I do.

I assume that some missing field is now causing some diagnostics to be unparseable by my client.

Should block the next release.

CC @pjweinb @adonovan

@findleyr findleyr added this to the gopls/v0.19.0 milestone Apr 25, 2025
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Apr 25, 2025
@findleyr
Copy link
Member Author

Of course: we're sending 0 for the file version for closed files. I guess my client interprets that as in the past.

@pjweinb
Copy link

pjweinb commented Apr 25, 2025

That CL fixed a bug. But I don't understand why @latest works ok.

@findleyr
Copy link
Member Author

The CL has not been released, which is why latest works.

I understand that the CL fixed a bug, but it also changed all integer fields to not use omitempty. It seems that, without an audit, we cannot assume that those changes were semantically correct.

@adonovan adonovan pinned this issue Apr 25, 2025
@adonovan adonovan unpinned this issue Apr 25, 2025
@adonovan
Copy link
Member

adonovan commented Apr 25, 2025

See also #71489 (comment), which is another case where zero has a different meaning from missing, and this distinction is lost during marshaling.

[Never mind, that's the same issue that's attached to the CL that caused the regression.]

@gabyhelp
Copy link

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. gopls Issues related to the Go language server, gopls. release-blocker Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

5 participants