Bump golang.org/x/tools from 0.5.0 to 0.6.0 #69

Merged
dependabot[bot] merged 2 commits from dependabot/go_modules/golang.org/x/tools-0.6.0 into v3 2023-02-18 02:04:27 +03:00
dependabot[bot] commented 2023-02-13 19:03:54 +03:00 (Migrated from github.com)

Bumps golang.org/x/tools from 0.5.0 to 0.6.0.

Release notes

Sourced from golang.org/x/tools's releases.

gopls/v0.6.0

Features

Default to -mod=readonly

In Go 1.16, the Go command will no longer modify user's go.mod and go.sum files automatically (https://tip.golang.org/doc/go1.16#tools). In order to match this behavior, gopls now also uses -mod=readonly when running the go command. Any errors reported by the go command will be presented with a suggested fix to make the necessary fixes to your go.mod or go.sum files. As a consequence, your workspace may be in a partially broken state while you have errors in your go.mod or go.sum file. 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 allowModfileModifications configuration to true.

Default to GOPROXY=off

gopls no longer accesses the network implicitly. This should improve latency in all cases, but it also means that gopls will no longer automatically download modules that are not found in your local module cache. The one exception is that gopls will still download dependencies on start-up, so it will continue to work as expected if you have cloned a repository for the first time. If gopls detects 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 allowImplicitNetworkaccess configuration to true.

Inclusion/exclusion filters for directories

gopls now 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 the go command, so gopls will still load metadata for these directories, which may be expensive. Configure the included/excluded directories through the directoryFilters setting.

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, gopls will not start these more costly operations. This should significantly reduce CPU utilization. This debounce delay can be optionally configured via the experimentalDiagnosticsDelay setting.

"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 running go get -u all, while the second go 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 gopls settings:

"analyses": {		
	"fieldalignment": true
}

Fixes

Improvements to diagnostics tracking

Diagnostic messages were not being updated correctly when the GC details code lens was toggled on. New handling to differentiate diagnostics by sources should have resolved this issue.

... (truncated)

Commits
  • d0863f0 go.mod: update golang.org/x dependencies
  • 545ca87 gopls/internal/regtest/marker: require go/packages
  • 1ace7db go,gopls: remove license from package doc comments
  • ebad375 gopls/internal/lsp/protocol: prevent license rendering in godoc
  • 10a39ef gopls/internal/lsp/regtest: address additional comments on marker.go
  • 69920f2 gopls/internal/regtest/marker: add missing tests for hover
  • 24a13c6 gopls/internal/regtest: fill out features of the new marker tests
  • 2b149ce gopls/internal/regtest: add a regtest-based version of the marker tests
  • edddc5f go/packages: don't discard errors loading export data
  • a762c82 go/ssa: add MultiConvert instruction
  • Additional commits viewable in compare view

Dependabot compatibility score

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 rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will 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 version will 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 dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.5.0 to 0.6.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/golang/tools/releases">golang.org/x/tools's releases</a>.</em></p> <blockquote> <h1>gopls/v0.6.0</h1> <h2>Features</h2> <h3>Default to <code>-mod=readonly</code></h3> <p>In Go 1.16, the Go command will no longer modify user's <code>go.mod</code> and <code>go.sum</code> files automatically (<a href="https://tip.golang.org/doc/go1.16#tools">https://tip.golang.org/doc/go1.16#tools</a>). In order to match this behavior, <code>gopls</code> now also uses <code>-mod=readonly</code> when running the <code>go</code> command. Any errors reported by the <code>go</code> command will be presented with a suggested fix to make the necessary fixes to your <code>go.mod</code> or <code>go.sum</code> files. As a consequence, your workspace may be in a partially broken state while you have errors in your <code>go.mod</code> or <code>go.sum</code> file. <a href="https://github-redirect.dependabot.com/golang/go/issues/42266">golang/go#42266</a> will mitigate this, but it will likely not be resolved until February.</p> <p><strong>Not recommended</strong>: If you must opt out of this behavior, you can set the <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#allowmodfilemodifications-bool"><code>allowModfileModifications</code></a> configuration to <code>true</code>.</p> <h3>Default to <code>GOPROXY=off</code></h3> <p><code>gopls</code> no longer accesses the network implicitly. This should improve latency in all cases, but it also means that <code>gopls</code> will no longer automatically download modules that are not found in your local module cache. The one exception is that <code>gopls</code> will still download dependencies on start-up, so it will continue to work as expected if you have cloned a repository for the first time. If <code>gopls</code> detects a missing module, it will offer you a suggested fix that downloads it.</p> <p><strong>Not recommended</strong>: If you must opt out of this behavior, you can set the <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#allowimplicitnetworkaccess-bool"><code>allowImplicitNetworkaccess</code></a> configuration to <code>true</code>.</p> <h3>Inclusion/exclusion filters for directories</h3> <p><code>gopls</code> now 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 the <code>go</code> command, so <code>gopls</code> will still load metadata for these directories, which may be expensive. <strong>Configure the included/excluded directories through the <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#directoryfilters-string"><code>directoryFilters</code></a> setting.</strong></p> <h3>Debouncing for diagnostics</h3> <p>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, <code>gopls</code> will not start these more costly operations. This should significantly reduce CPU utilization. This debounce delay can be optionally configured via the <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#experimentaldiagnosticsdelay-timeduration"><code>experimentalDiagnosticsDelay</code></a> setting.</p> <h3>&quot;Upgrade direct dependencies&quot; code lens</h3> <p>In <a href="https://github.com/golang/tools/releases/tag/gopls%2Fv0.5.4"><code>gopls/v0.5.4</code></a>, we removed the per-require &quot;Upgrade dependency&quot; 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 &quot;Upgrade all dependencies&quot; code lens into two: &quot;Upgrade transitive dependencies&quot; and &quot;Upgrade direct dependencies&quot;. The first is the equivalent of running <code>go get -u all</code>, while the second <code>go get</code>s each of your module's requires independently. We are continuing to work on improving these features and will likely bring back the &quot;Upgrade dependency&quot; code lens as a suggested fix (learn more: <a href="https://github-redirect.dependabot.com/golang/go/issues/38339">golang/go#38339</a>).</p> <h3>Support for filling a partially-populated struct</h3> <p>The &quot;Fill struct&quot; suggested fix will now be suggested for structs that have some, but not all, fields set.</p> <h3>Experimental</h3> <h4>Field alignment analyzer</h4> <p>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 <code>gopls</code> settings:</p> <pre lang="json5"><code>&quot;analyses&quot;: { &quot;fieldalignment&quot;: true } </code></pre> <h2>Fixes</h2> <h3>Improvements to diagnostics tracking</h3> <p>Diagnostic messages were not being updated correctly when the <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#codelenses-mapstringbool"><code>GC details</code></a> code lens was toggled on. New handling to differentiate diagnostics by sources should have resolved this issue.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/golang/tools/commit/d0863f03daeff79ab917de5768285bb077f77b20"><code>d0863f0</code></a> go.mod: update golang.org/x dependencies</li> <li><a href="https://github.com/golang/tools/commit/545ca87cb53fecbea3162bffc4057580c456a4d0"><code>545ca87</code></a> gopls/internal/regtest/marker: require go/packages</li> <li><a href="https://github.com/golang/tools/commit/1ace7dbcb0dee7c24be0672c77979cd86f966322"><code>1ace7db</code></a> go,gopls: remove license from package doc comments</li> <li><a href="https://github.com/golang/tools/commit/ebad375bab94c682db69281cfb1e334f3f027d53"><code>ebad375</code></a> gopls/internal/lsp/protocol: prevent license rendering in godoc</li> <li><a href="https://github.com/golang/tools/commit/10a39ef32d4bd0adc0bd4062ae6d291ea88accd0"><code>10a39ef</code></a> gopls/internal/lsp/regtest: address additional comments on marker.go</li> <li><a href="https://github.com/golang/tools/commit/69920f2e63b8c2fcebf58ce7b2a665cba9b2c5f1"><code>69920f2</code></a> gopls/internal/regtest/marker: add missing tests for hover</li> <li><a href="https://github.com/golang/tools/commit/24a13c6fade52381ab08896106c15e4dd1429fd1"><code>24a13c6</code></a> gopls/internal/regtest: fill out features of the new marker tests</li> <li><a href="https://github.com/golang/tools/commit/2b149ce94bddeffe0922f298a327f9f7fc5a4fce"><code>2b149ce</code></a> gopls/internal/regtest: add a regtest-based version of the marker tests</li> <li><a href="https://github.com/golang/tools/commit/edddc5fc3223b7f12772f78079fcbcac3bd47d97"><code>edddc5f</code></a> go/packages: don't discard errors loading export data</li> <li><a href="https://github.com/golang/tools/commit/a762c82c1bf92071826228d76d50278e350b2632"><code>a762c82</code></a> go/ssa: add MultiConvert instruction</li> <li>Additional commits viewable in <a href="https://github.com/golang/tools/compare/v0.5.0...v0.6.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/tools&package-manager=go_modules&previous-version=0.5.0&new-version=0.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will 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 version` will 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 dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
github-actions[bot] (Migrated from github.com) approved these changes 2023-02-13 19:04:12 +03:00
github-actions[bot] (Migrated from github.com) approved these changes 2023-02-18 02:01:57 +03:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: unistack-org/protoc-gen-go-micro#69
No description provided.