github golang/tools gopls/v0.12.0-pre.3

latest releases: v0.21.0, gopls/v0.15.3, gopls/v0.15.3-pre.2...
pre-release11 months ago

This third prerelease contains several bug fixes following the v0.12.0-pre.2 release, and again contains some additional performance improvements. If all goes well. we plan to promote this to v0.12.0 on Tue May 30.

You can install this prerelease with go install:

go install golang.org/x/tools/gopls@v0.12.0-pre.3

To revert to the last stable release, run go install golang.org/x/tools/gopls@latest (though given that this is a release candidate, if you need to do this please file an issue).

Changes since pre.2

The most significant bug fix (golang/go#60089) relates to the file-watching mechanism by which gopls requests file change notifications from the client editor. Previously, gopls would generate a large glob pattern that, in large workspaces, would cause VSCode to get stuck. Now, gopls generates many smaller patterns, which works well with VSCode but may cause other editors (e.g. coc.nvim) to slow down. So, the new behavior is enabled automatically based on the client type, though it can be controlled explicitly using the new subdirWatchPatterns setting (golang/go#59635).

The file-based cache introduced in gopls v0.12 has been simplified in this pre-release, borrowing a number of ideas from the go command's module cache. It achieves atomic updates using more reliable and portable system calls. It uses a simpler directory structure, saving space. It avoids most metadata update operations in its LRU eviction. And it uses an additional memory-based caching layer to avoid disk access in most cache-hit cases.

Other highlights:

  • a number of optimizations related to go mod tidy operation (golang/go#60089);
  • a limit on the module scan, which was causing slow startup in some cases (golang/go#56496);
  • placeholders for the name and type of each argument in completion of calls to unimported packages (golang/go#60269);
  • a race fixed in in reloading of package metadata for ad-hoc packages (golang/go#57209);
  • a new gopls stats -anon flag that redacts fields potentially containing user information.

In this release, we also announce the end of gopls' support for versions go1.16 and go1.17 of the go command. (golang/go#60341)

How to report a problem

As always, you can report gopls problem by filing an issue. We are particularly interested in any regressions you observe since gopls@v0.11.0.

If you would prefer not to report an issue on the issue tracker, you can also reach out to us via email to rfindley@google.com or adonovan@google.com.

Don't miss a new tools release

NewReleases is sending notifications on new releases.