gopls/v0.15.2
版本发布时间: 2024-03-12 22:39:20
golang/tools最新发布版本:gopls/v0.16.2(2024-09-06 01:01:04)
This release fixes the following regressions in gopls@v0.15.0+.
- golang/go#66109: a crash when encountering a test file excluded via build tags, which also contained an invalid import of a
main
package. This could occur in atools_test.go
file implementing the common pattern for tool dependencies. - golang/go#66145: spurious import errors in multi-root workspaces. In some scenarios, the new zero-config logic added in gopls@v0.15.0 resulted in inaccurate errors about missing imports. This could occur when module
A
has a localreplace
of moduleB
, andA
andB
are open as a separate workspace folders. - golang/go#66195: a crash when working on modules with a go directive of the form
go a.b.c
, when gopls was compiled with Go 1.20 or earlier. - golang/go#66090: a crash when SignatureHelp is cancelled (found via telemetry)
- golang/go#66250: a crash in references when one of the package files is missing a package declaration (found via telemetry)
These last two crashes are worth highlighting. Both were found via the (off by default) automated crash reporting added in gopls@v0.15.0. Both were unlikely to get reported via GitHub issues, because they won't happen frequently enough for most LSP clients to notify the user. This is a perfect example of how telemetry can help us deliver a more reliable product than would be possible without automated reporting.