goimports v0.5.5 Release Notes

Release Date: 2020-12-04 // 11 months ago
  • gopls/v0.5.5

    ๐Ÿš€ This is a patch release to fix two bugs in gopls/v0.5.4.

    ๐Ÿ›  Fixes

    ๐Ÿ“ฆ Excessive reloading of packages outside of GOPATH or a module

    ๐Ÿ‘€ See golang/go#42813.

    ๐Ÿ’… File corruption with CRLF line endings and //-style comments

    ๐Ÿ›  golang/go#42646 was supposed to have been fixed in gopls/v0.5.4, but it was not. golang/go#42923 was reported and fixed.


    ๐Ÿ›  A full list of all issues fixed can be found in the gopls/v0.5.5 milestone. To report a new problem, please file a new issue at https://golang.org/issues/new.


Previous changes from v0.5.4

  • ๐Ÿ”‹ Features

    Opening a project that contains a module in a subdirectory

    Previously, gopls required that you open your editor exactly at or below the module root (the directory containing the go.mod). Now, you can open a directory that contains exactly one module in a subdirectory, and gopls will work as expected. For details on multi-module workspaces, see below.

    ๐Ÿ‘Œ Improved error message reports

    ๐Ÿš‘ Previously, critical error messages were reported as message pop-up that would re-trigger as you type. Many users would find this annoying. We have changed the approach to show error messages as progress reports, which should be less intrusive and appear more like status bars.

    ๐Ÿ‘Œ Improved memory usage for workspaces with multiple folders

    ๐Ÿ“ฆ We are now using a coarser cache key for package type information. If you use the gopls daemon, this may reduce your total memory usage.

    Experimental

    ๐Ÿ‘ Multi-module workspace support

    ๐Ÿ‘€ The proposal described in golang/go#32394 is still in development and off by default. See our progress by tracking the multi-module workspace milestone and project.

    ๐Ÿ‘ Enable multi-module workspace support by adding the following to your settings:

    "gopls": {"experimentalWorkspaceModule": true,}
    

    With this setting, you will be able to open a directory that contains multiple modules or a directory that contains nested modules.

    Give this a try if you're interested in this new feature, but please note that it is still very experimental. Please file issues if you encounter bugs.

    ๐Ÿ›  Fixes

    ๐Ÿ’… File corruption with CRLF line endings and /**/-style comments

    ๐Ÿ Previously, when you organized the imports in a file with CRLF line endings and multi-line comments, the formatter might output incorrect content for the file, rendering it invalid Go code. This issue has popped up a number of times, but we believe it has finally been fixed for good. If you are using Windows with CRLF line ending, please report any regressions. For full details, see golang/go#42646.


    ๐Ÿ›  A full list of all issues fixed can be found in the gopls/v0.5.4 milestone. To report a new problem, please file a new issue at https://golang.org/issues/new.

    Thank you to our contributors!

    @findleyr @heschik @pjweinb @leitzler @yangwenmai @matloob @golopot @muirdm