Closed jech closed 9 months ago
Hi, the latest version of gopls is v0.14.2. What do you mean by 0.16 and 0.17? https://pkg.go.dev/golang.org/x/tools/gopls?tab=versions
The versions of gopls currently in Debian are the following:
I have no idea how the Debian versions relate to the upstream versions, but I see that the tools
git repository has tags called v0.16.1 v0.17.0, so I've assumed that these are also the upstream versions.
Aha, @jech those are versions for the x/tools module. Versions of the nested x/tools/gopls module correspond to tags like gopls/v0.14.2
. x/tools@v0.17.0 contains commits that have not yet been included in the latest gopls release.
Therefore, you may indeed be observing a regression. We will investigate.
Thank you for reporting. We're preparing the gopls@v0.15.0 release, and you may have caught a bug.
Hmm, however I'm not able to reproduce, even when installing gopls at the v0.17.0 commit of x/tools. I am able to successfully suppress composites. Logs from a short gopls session would help me diagnose further. For example, I'll be able to see whether the editor is successfully sending settings to gopls. Beware that these logs may contain source code.
Hi, we've now had three reports for this behavior, all related to emacs. I think we broke the configuration workflow in a way that affects only emacs. I'll investigate and fix. Thank you for reporting!
Thanks very much for the logs -- looking at them it appears that eglot has always been returning an error from one of our configuration requests, and it may be that our handling of this error changed.
I've set up emacs+eglot and reproduced, so I've got it from here.
Change https://go.dev/cl/563475 mentions this issue: gopls/internal/server: fix two bugs related to dynamic configuration
Thanks a lot.
Since Emacs didn't complain, does that indicate there's a bug in eglot? If so, could you please either file a bug against eglot, or give me enough details so I can do it myself?
@jech I don't think there's a bug in eglot. There were two bugs in gopls, as described in the CL above. The pre-existing bug is that gopls was sending ""
instead of omitting a field in a configuration request. Many clients (particularly javascript-based clients) were tolerant of this, but Emacs was not. I think Emacs is right. The new bug in gopls broke what was previously masking the old bug. Both bugs are now fixed at tip.
Cool, thanks for the clarification.
Go version
go version go1.21.6 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I have the following in my eglot configuration:
This works fine with gopls 0.16, but doesn't seem to do anything useful in gopls 0.17.
What did you see happen?
With gopls 0.17, Emacs displays diagnostics about unkeyed composites. WIth gopls 0.16, composites diagnostics are correctly suppressed.
What did you expect to see?
No composites diagnostics in both 0.16 and 0.17.