Releases: golang/tools
Releases · golang/tools
gopls/v0.3.1
- golang/go#36975: Handle nil pointer in builtin packages if workspace load fails.
 - golang/go#36999: Fix panic on files that contain 
%in their paths. - Fix memory leak caused by autocompletion (CL 217677). Users were seeing huge memory usage over long sessions. Please comment on #36943 if you're still seeing this issue with 
gopls/v0.3.1. 
gopls/v0.3.0
Note: gopls now loads your entire workspace, where “workspace” is directory you opened in your editor.
In module mode, you must open your module root (directory containing the go.mod file) or a subdirectory.
In GOPATH mode, you must open your GOPATH/src or a directory within it. If you have a large GOPATH and you open your GOPATH as your workspace root, gopls may be very slow to load. Please see #36899 for further information.
- Autocompletion from unimported packages is on by default. You will get completions for something like 
fmt.Printfeven if“fmt”isn’t imported yet. (@heschik) - Workspace-scoped references, rename, and go to implementation. These features use your workspace root as the search scope, so behavior will vary based on the directory you open in your editor. This may result in unexpected behavior. (@muirdm, @matloob)
 - Workspace-wide diagnostics. You will now see errors in your entire workspace, rather than just in your currently open files. Analysis errors will only be shown for packages with currently open files.
 - Watch file changes on disk. This allows users to switch branches without reloading their editors. Also, changing configurations no longer requires an editor reload.
 - GOPATH vendoring is fully supported. Previously, some features would ignore vendor directories, causing errors if packages weren't in GOPATH. (@heschik)
 - New autocompletion suggestions for type conversions. Improved completions for literal candidates and variadic functions. Better rankings, including rankings for builtin functions and keywords. (@muirdm)
 - Highlighting improvements: Highlighting now applies not only to variables, but also to fields, methods, types, and imports. Additional highlighting helps visualize control flow in loops and functions. Highlighting of single character variables has better support. (@ridersofrohan)
 - Documentation on hover includes links to pkg.go.dev for exported symbols. (@Southclaws)
 - Improved support for cgo dependencies. All features now work for packages that have cgo dependencies. Authoring cgo packages is still not supported, but improvements are scheduled for Go 1.15 (see #35721). (@heschik)
 - Deep completions are now on by default. This feature of completion will search the fields and methods of all available candidates to see if there are any more candidates with the expected type. As an example, say you have imported the 
contextpackage and are calling a function that takes acontext.Contextas a parameter. In the case that you don’t have a variable of that type in scope, deep completions will suggestcontext.Background()andcontext.TODO(). (@muirdm) 
Opt-in:
- staticcheck analyses remain opt-in and can be enabled by setting 
"staticcheck": truein yourgoplssettings. - Go 1.14 will support running the go command without modifying the user’s 
go.modfile. This new feature is used ingoplsto show diagnostics and suggest edits in a user’sgo.modfile rather than change the file without the user noticing. Currently,goplswill suggest removing unused dependencies and warn the user if there is a parse error in thego.modfile. Enable this behavior by using the go1.14 beta and setting"tempModfile": truein yourgoplssettings. (@ridersofrohan) 
gopls/v0.2.2
gopls/v0.2.1
- Fix for parse errors showing up as errors on the whole package (CL 206597).
 
gopls/v0.2.0
- Many improvements to autocompletion. In particular, support for completions of array, slice, map, and function literals (@muirdm).
 - A new diff algorithm (github.com/sergi/go-diff) that improves handling of line endings on different operating systems (@ianthehat).
 - Improved caching and memory usage (@stamblerre).
 - Command-line support for links, suggested fixes, and imports (@kalmanb).
 - Command-line support for references, signature, and symbols (@rentziass).
 - Command-line support for rename (@hartzell).
 
Opt-in:
- Get diagnostics from staticcheck by configuring 
"staticcheck": truein your gopls settings (@ianthehat). - Get autocompletion of unimported packages and symbols by configuring 
"completeUnimported": truein your gopls settings (@heschik).