-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: bad go.mod affects anayses but not formatting; no errors in logs #44204
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
Comments
Change https://golang.org/cl/291192 mentions this issue: |
That CL was not supposed to close this issue, but it might be worth checking if it incidentally fixed it. |
Doesn't seem like it, unfortunately. I can still reproduce the original issue. |
Thanks for confirming, I'll take a look when I get a chance. |
I'm afraid I can't reproduce it, even with experimentalWorkspaceModule. I get a diagnostic on the appropriate line of the go.mod, as well as an "Error loading workspace" status message. Can you double-check that you're using a version with that CL included and upload a log? Sorry for the trouble. |
@heschik, yes, I can still reproduce it. The Build info from
Please let me know if there is any other useful info I can provide. |
Interesting approach. Happened to work here. From
So I'm not quite sure what to tell you. It appears we're generating errors at least to some extent, but they're not showing up in the client? @findleyr, can you shed any light on this since you know vim stuff? |
@heschik, I've done some more digging, and apparently
From what I can tell, including this message by @stamblerre, |
That is debug logging, not user-facing. showMessage is a modal dialog and definitely not appropriate here. gopls is publishing user-facing diagnostics that your editor is not showing; you can see them if you enable rpc.trace and in the debug page I mentioned above. |
It seems like you are correct. Maybe some kind of an issue with how Neovim handles diagnostics from buffers that aren't loaded and files that aren't open. I'm going to close this issue and keep digging. Sorry for the noise. |
What did you do?
I'm using Neovim nightly (
0.5.0+ubuntu2+git202102080233-02a3c4179
) with the officialnvim-lspconfig
package installed (041dfd7f
). My configuration:In one of my personal projects I've had a bad
go.mod
:Notice the keyword
package
instead ofmodule
.What did you expect to see?
Error messages in the logs.
What did you see instead?
No error messages. Formatting works, but not analyses like
fieldalignment
.Build info
I am ready to provide any additional information.
EDIT: Possibly related to #36531?
The text was updated successfully, but these errors were encountered: