build(deps): bump golang.org/x/tools from 0.2.0 to 0.6.0
Bumps golang.org/x/tools from 0.2.0 to 0.6.0.
Release notes
Sourced from golang.org/x/tools's releases.
gopls/v0.6.0
Features
Default to
-mod=readonlyIn Go 1.16, the Go command will no longer modify user's
go.modandgo.sumfiles automatically (https://tip.golang.org/doc/go1.16#tools). In order to match this behavior,goplsnow also uses-mod=readonlywhen running thegocommand. Any errors reported by thegocommand will be presented with a suggested fix to make the necessary fixes to yourgo.modorgo.sumfiles. As a consequence, your workspace may be in a partially broken state while you have errors in yourgo.modorgo.sumfile. golang/go#42266 will mitigate this, but it will likely not be resolved until February.Not recommended: If you must opt out of this behavior, you can set the
allowModfileModificationsconfiguration totrue.Default to
GOPROXY=off
goplsno longer accesses the network implicitly. This should improve latency in all cases, but it also means thatgoplswill no longer automatically download modules that are not found in your local module cache. The one exception is thatgoplswill still download dependencies on start-up, so it will continue to work as expected if you have cloned a repository for the first time. Ifgoplsdetects a missing module, it will offer you a suggested fix that downloads it.Not recommended: If you must opt out of this behavior, you can set the
allowImplicitNetworkaccessconfiguration totrue.Inclusion/exclusion filters for directories
goplsnow supports excluding certain directories in your workspace from analysis. This may be useful if you are only working on a subset of a large repository. Note that these filters are not propagated to thegocommand, sogoplswill still load metadata for these directories, which may be expensive. Configure the included/excluded directories through thedirectoryFilterssetting.Debouncing for diagnostics
Diagnostics are now reported instantly only for the packages currently being edited. Diagnostics for other packages in the workspace will now only be computed after 250 milliseconds, meaning that, if you are actively typing,
goplswill not start these more costly operations. This should significantly reduce CPU utilization. This debounce delay can be optionally configured via theexperimentalDiagnosticsDelaysetting."Upgrade direct dependencies" code lens
In
gopls/v0.5.4, we removed the per-require "Upgrade dependency" code lens, as it was very high latency, and its UX did not meet user needs. Some users have expressed disappointment about this, so, to bridge the gap, we have separated the existing "Upgrade all dependencies" code lens into two: "Upgrade transitive dependencies" and "Upgrade direct dependencies". The first is the equivalent of runninggo get -u all, while the secondgo gets each of your module's requires independently. We are continuing to work on improving these features and will likely bring back the "Upgrade dependency" code lens as a suggested fix (learn more: golang/go#38339).Support for filling a partially-populated struct
The "Fill struct" suggested fix will now be suggested for structs that have some, but not all, fields set.
Experimental
Field alignment analyzer
A new analyzer has been added to suggest reordering fields in a struct in order to achieve the optimal alignment in memory. It is still off by default, but can be enabled by adding the following to your
goplssettings:"analyses": { "fieldalignment": true }Fixes
Improvements to diagnostics tracking
Diagnostic messages were not being updated correctly when the
GC detailscode lens was toggled on. New handling to differentiate diagnostics by sources should have resolved this issue.
... (truncated)
Commits
d0863f0go.mod: update golang.org/x dependencies545ca87gopls/internal/regtest/marker: require go/packages1ace7dbgo,gopls: remove license from package doc commentsebad375gopls/internal/lsp/protocol: prevent license rendering in godoc10a39efgopls/internal/lsp/regtest: address additional comments on marker.go69920f2gopls/internal/regtest/marker: add missing tests for hover24a13c6gopls/internal/regtest: fill out features of the new marker tests2b149cegopls/internal/regtest: add a regtest-based version of the marker testsedddc5fgo/packages: don't discard errors loading export dataa762c82go/ssa: add MultiConvert instruction- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)