-
Notifications
You must be signed in to change notification settings - Fork 17.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/gopls: deprecate the "experimentalUseInvalidMetadata" setting #54180
Comments
Change https://go.dev/cl/420956 mentions this issue: |
To support the experimentalUseInvalidMetadata mode, we keep around invalid metadata. This can help gopls features work when, for example, the go.mod file is broken. It is debatable whether this feature is worth supporting (see golang/go#54180), but in the meantime there is a very negative side-effect when module paths are changed in the go.mod file: we keep around a bunch of workspace packages with a stale module path. As a result we can be left with a lots of extra type-checked packages in memory, and many inaccurate diagnostics. Fix this by skipping packages with invalid metadata when computing workspace packages. While we may want to use invalid metadata when finding the best package for a file, it does not make sense to re- type-check and diagnose all those stale packages. Fixes golang/go#43186 Change-Id: Id73b47ea138ec80a9de63b03dae41d4e509b8d5a Reviewed-on: https://go-review.googlesource.com/c/tools/+/420956 Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Suzy Mueller <suzmue@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
CC @adonovan Unless anyone objects, I propose that we remove this setting. We should avoid any cases where gopls' state is path-dependent. |
Change https://go.dev/cl/434640 mentions this issue: |
Change https://go.dev/cl/452057 mentions this issue: |
This change removes the call to invalidatePackagesLocked after buildMetadata in the load method; now that we no longer permit invalid metadata, it is unnecessary. (The sole remaining call to invalidatePackagesLocked was inlined into Clone.) Also: - check the invalidation invariant in load before Clone. - merge MetadataForFile and getOrLoadIDsForURI since all callers want the Metadata (not just PackageID) and the defensive check is no longer needed. - simplify awaitLoadedAllErrors by calling getInitializationError. - reduce allocation and critical sections in various snapshot methods that retrieve the metadataGraph. - flag various places where we can avoid type-checking. - various other doc comments. Updates golang/go#54180 Change-Id: I82dca203b2520259630b2fd9d08e120030d44a96 Reviewed-on: https://go-review.googlesource.com/c/tools/+/452057 Run-TryBot: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
gopls/v0.11.0 This is a small release containing new integrations of vulnerability analysis. Vulnerability analysis for go.mod files can be enabled by configuring the "vulncheck" setting to "Imports". For more information on vulnerability management, see the Vulnerability Management for Go blog post. Support changes This release removes support for the "experimentalUseInvalidMetadata" setting, as described in the v0.10.0 release. Other settings slated for deprecation in that release remain temporarily supported, but will be removed in v0.12.0. New Features - Analyzing dependencies for vulnerabilities - Additional checks for the loopclosure analyzer gopls/v0.10.0 This release contains initial support for standalone packages and package renaming. Please see below for more details. We are also changing our release policy to better align with semver. Support changes This version of gopls contains changes to our release policy, deprecates support for some older Go versions, and deprecates support for several experimental features. New release policy As described in golang/go#55267, we are tightening our release policy to better follow semver, increase stability, and reduce release-related toil. Significant new features will only be introduced in *.*.0 patch versions, and subsequent patch releases will consist only of bugfixes. For example, this version (v0.10.0) introduces several new features, described below. Subsequent v0.10.* releases will contain only bugfixes. Final support for Go 1.13-1.15 Consistent with the above release policy and our stated support window, the v0.10.* minor version will be the final set of releases to support being used with Go 1.13-1.15. See golang/go#52982 for details. Gopls will pop up a warning if it resolves a version of the go command that is older than 1.16. Starting with gopls@v0.11.0, gopls will cease to function when used with a go command with a version older than 1.16. Deprecated experimental features The following experimental features are deprecated, and will be removed in gopls@v0.11.0: * experimentalWorkspaceModule (golang/go#52897): this feature has been replaced by go.work files. See our documentation for information on how to use go.work files to work on multiple modules. * experimentalWatchedFileDelay (golang/go#55268): LSP clients should instead be responsible for buffering workspace/didChangeWatchedFiles notifications. * experimentalUseInvalidMetadata (golang/go#54180): we are going to focus instead on improving diagnostics for broken workspaces. New Features Support for "standalone packages" Gopls now recognizes certain files as "standalone main packages", meaning they should be interpreted as main packages consisting of a single file. To do this, gopls looks for packages named main containing a single build constraint that matches one of the tags configured by the new standaloneTags setting.
gopls/v0.11.0 This is a small release containing new integrations of vulnerability analysis. Vulnerability analysis for go.mod files can be enabled by configuring the "vulncheck" setting to "Imports". For more information on vulnerability management, see the Vulnerability Management for Go blog post. Support changes This release removes support for the "experimentalUseInvalidMetadata" setting, as described in the v0.10.0 release. Other settings slated for deprecation in that release remain temporarily supported, but will be removed in v0.12.0. New Features - Analyzing dependencies for vulnerabilities - Additional checks for the loopclosure analyzer gopls/v0.10.0 This release contains initial support for standalone packages and package renaming. Please see below for more details. We are also changing our release policy to better align with semver. Support changes This version of gopls contains changes to our release policy, deprecates support for some older Go versions, and deprecates support for several experimental features. New release policy As described in golang/go#55267, we are tightening our release policy to better follow semver, increase stability, and reduce release-related toil. Significant new features will only be introduced in *.*.0 patch versions, and subsequent patch releases will consist only of bugfixes. For example, this version (v0.10.0) introduces several new features, described below. Subsequent v0.10.* releases will contain only bugfixes. Final support for Go 1.13-1.15 Consistent with the above release policy and our stated support window, the v0.10.* minor version will be the final set of releases to support being used with Go 1.13-1.15. See golang/go#52982 for details. Gopls will pop up a warning if it resolves a version of the go command that is older than 1.16. Starting with gopls@v0.11.0, gopls will cease to function when used with a go command with a version older than 1.16. Deprecated experimental features The following experimental features are deprecated, and will be removed in gopls@v0.11.0: * experimentalWorkspaceModule (golang/go#52897): this feature has been replaced by go.work files. See our documentation for information on how to use go.work files to work on multiple modules. * experimentalWatchedFileDelay (golang/go#55268): LSP clients should instead be responsible for buffering workspace/didChangeWatchedFiles notifications. * experimentalUseInvalidMetadata (golang/go#54180): we are going to focus instead on improving diagnostics for broken workspaces. New Features Support for "standalone packages" Gopls now recognizes certain files as "standalone main packages", meaning they should be interpreted as main packages consisting of a single file. To do this, gopls looks for packages named main containing a single build constraint that matches one of the tags configured by the new standaloneTags setting.
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.9.3 to 0.10.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> <h2>gopls/v0.10.0</h2> <p>This release contains initial support for standalone packages and package renaming. Please see below for more details.</p> <p>We are also changing our release policy to better align with semver.</p> <h2>Support changes</h2> <p>This version of gopls contains changes to our release policy, deprecates support for some older Go versions, and deprecates support for several experimental features.</p> <h3>New release policy</h3> <p>As described in <a href="https://redirect.github.com/golang/go/issues/55267">golang/go#55267</a>, we are tightening our release policy to better follow semver, increase stability, and reduce release-related toil. Significant new features will only be introduced in <code>*.*.0</code> patch versions, and subsequent patch releases will consist only of bugfixes. For example, this version (v0.10.0) introduces several new features, described below. Subsequent v0.10.* releases will contain only bugfixes.</p> <h3>Final support for Go 1.13-1.15</h3> <p>Consistent with the above release policy and our stated <a href="https://github.com/golang/tools/tree/master/gopls#supported-go-versions-and-build-systems">support window</a>, the <code>v0.10.*</code> minor version will be the final set of releases to support being used with Go 1.13-1.15. See <a href="https://redirect.github.com/golang/go/issues/52982">golang/go#52982</a> for details.</p> <p>Gopls will pop up a warning if it resolves a version of the <code>go</code> command that is older than 1.16. Starting with gopls@v0.11.0, gopls will cease to function when used with a <code>go</code> command with a version older than 1.16.</p> <h3>Deprecated experimental features</h3> <p>The following experimental features are deprecated, and will be removed in gopls@v0.11.0:</p> <ul> <li><strong>experimentalWorkspaceModule</strong><code>golang/go#52897</code><code>go.work</code> files. See our <a href="https://github.com/golang/tools/blob/master/gopls/doc/workspace.md#go-workspaces-go-118">documentation</a> for information on how to use <code>go.work</code> files to work on multiple modules.</li> <li><strong>experimentalWatchedFileDelay</strong><code>golang/go#55268</code><code>workspace/didChangeWatchedFiles</code> notifications.</li> <li><strong>experimentalUseInvalidMetadata</strong><code>golang/go#54180</code></li> </ul> <h2>New Features</h2> <h3>Support for "standalone packages"</h3> <p>Gopls now recognizes certain files as "standalone main packages", meaning they should be interpreted as main packages consisting of a single file. To do this, gopls looks for packages named <code>main</code> containing a single build constraint that matches one of the tags configured by the new <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#standalonetags-string"><code>standaloneTags</code></a> setting.</p> <p>This enables cross references and other features when working in a file such as the example below that contains a <code>//go:build ignore</code> build constraint.</p> <p><img src="https://user-images.githubusercontent.com/57144380/197039428-72d78300-cbea-4abe-a408-e171991094b8.png" alt="image" /></p> <h3>(preview) Support for package renaming</h3> <p><code>golang/go#41567</code><a href="https://redirect.github.com/golang/go/issues/56184">golang/go#56184</a>.</p> <p>To rename a package, initiate a rename request on the package clause of a file in the package: <img src="https://user-images.githubusercontent.com/57144380/197041786-bf9e617c-9961-46ae-b21a-c240a18a3014.png" alt="image" /></p> <p>When this renaming is applied, gopls will adjust other package files accordingly, rename the package directory, and update import paths referencing the current package or any nested package in the renamed directory. <img src="https://user-images.githubusercontent.com/57144380/197042160-e034e38d-3cd3-4c62-b912-747d8dc2f4ff.png" alt="image" /></p> <h3>Method information in hover</h3> <p>Hovering over a type now shows a summary of its methods.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/golang/tools/commit/7261b3269227f2c7636f7d4316ed3dd5122d17ff"><code>7261b32</code></a> gopls/internal/regtest: fix goimports on windows when using vendoring</li> <li><a href="https://github.com/golang/tools/commit/41e4e565498859435a2ad44a71cf6701a6afb585"><code>41e4e56</code></a> gopls/internal/lsp/source/completion: ensuring completion completeness</li> <li><a href="https://github.com/golang/tools/commit/ac2946029ad3806349fa00546449da9f59320e89"><code>ac29460</code></a> go/ssa: fix bug in writeSignature on external functions</li> <li><a href="https://github.com/golang/tools/commit/3b62e7e25641fc2dabe915a738906d0779724bf1"><code>3b62e7e</code></a> go/ssa: use core type within (*builder).receiver</li> <li><a href="https://github.com/golang/tools/commit/f394d451f85a030254df453bf84a450b228c4250"><code>f394d45</code></a> gopls/internal/lsp/cache: compute xrefs and methodsets asynchronously</li> <li><a href="https://github.com/golang/tools/commit/27dbf85279a5e6e906a8c1b5cc5b73e8229a8efa"><code>27dbf85</code></a> go.mod: update golang.org/x dependencies</li> <li><a href="https://github.com/golang/tools/commit/c6c983054920f47ed9e5ba1b55a7a5934dd8bf53"><code>c6c9830</code></a> go/types/objectpath: memoize scope lookup in objectpath.Encoder</li> <li><a href="https://github.com/golang/tools/commit/0245e1dfc6b09a30ad018bdcdadef4961067cfd4"><code>0245e1d</code></a> gopls/internal/regtest/codelens: set GOWORK=off for go mod vendor</li> <li><a href="https://github.com/golang/tools/commit/85be8882c905a9b24abcec8363e48a14ad5cd4e2"><code>85be888</code></a> go/analysis/passes/defers: add analyser for defer mistake</li> <li><a href="https://github.com/golang/tools/commit/c43232f868439dcfd25d98501dafa5e695cd1d35"><code>c43232f</code></a> cmd/digraph: improve examples using go list, mod</li> <li>Additional commits viewable in <a href="https://github.com/golang/tools/compare/v0.9.3...v0.10.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.9.3&new-version=0.10.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> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.9.3 to 0.10.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> <h2>gopls/v0.10.0</h2> <p>This release contains initial support for standalone packages and package renaming. Please see below for more details.</p> <p>We are also changing our release policy to better align with semver.</p> <h2>Support changes</h2> <p>This version of gopls contains changes to our release policy, deprecates support for some older Go versions, and deprecates support for several experimental features.</p> <h3>New release policy</h3> <p>As described in <a href="https://redirect.github.com/golang/go/issues/55267">golang/go#55267</a>, we are tightening our release policy to better follow semver, increase stability, and reduce release-related toil. Significant new features will only be introduced in <code>*.*.0</code> patch versions, and subsequent patch releases will consist only of bugfixes. For example, this version (v0.10.0) introduces several new features, described below. Subsequent v0.10.* releases will contain only bugfixes.</p> <h3>Final support for Go 1.13-1.15</h3> <p>Consistent with the above release policy and our stated <a href="https://github.com/golang/tools/tree/master/gopls#supported-go-versions-and-build-systems">support window</a>, the <code>v0.10.*</code> minor version will be the final set of releases to support being used with Go 1.13-1.15. See <a href="https://redirect.github.com/golang/go/issues/52982">golang/go#52982</a> for details.</p> <p>Gopls will pop up a warning if it resolves a version of the <code>go</code> command that is older than 1.16. Starting with gopls@v0.11.0, gopls will cease to function when used with a <code>go</code> command with a version older than 1.16.</p> <h3>Deprecated experimental features</h3> <p>The following experimental features are deprecated, and will be removed in gopls@v0.11.0:</p> <ul> <li><strong>experimentalWorkspaceModule</strong><code>golang/go#52897</code><code>go.work</code> files. See our <a href="https://github.com/golang/tools/blob/master/gopls/doc/workspace.md#go-workspaces-go-118">documentation</a> for information on how to use <code>go.work</code> files to work on multiple modules.</li> <li><strong>experimentalWatchedFileDelay</strong><code>golang/go#55268</code><code>workspace/didChangeWatchedFiles</code> notifications.</li> <li><strong>experimentalUseInvalidMetadata</strong><code>golang/go#54180</code></li> </ul> <h2>New Features</h2> <h3>Support for "standalone packages"</h3> <p>Gopls now recognizes certain files as "standalone main packages", meaning they should be interpreted as main packages consisting of a single file. To do this, gopls looks for packages named <code>main</code> containing a single build constraint that matches one of the tags configured by the new <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#standalonetags-string"><code>standaloneTags</code></a> setting.</p> <p>This enables cross references and other features when working in a file such as the example below that contains a <code>//go:build ignore</code> build constraint.</p> <p><img src="https://user-images.githubusercontent.com/57144380/197039428-72d78300-cbea-4abe-a408-e171991094b8.png" alt="image" /></p> <h3>(preview) Support for package renaming</h3> <p><code>golang/go#41567</code><a href="https://redirect.github.com/golang/go/issues/56184">golang/go#56184</a>.</p> <p>To rename a package, initiate a rename request on the package clause of a file in the package: <img src="https://user-images.githubusercontent.com/57144380/197041786-bf9e617c-9961-46ae-b21a-c240a18a3014.png" alt="image" /></p> <p>When this renaming is applied, gopls will adjust other package files accordingly, rename the package directory, and update import paths referencing the current package or any nested package in the renamed directory. <img src="https://user-images.githubusercontent.com/57144380/197042160-e034e38d-3cd3-4c62-b912-747d8dc2f4ff.png" alt="image" /></p> <h3>Method information in hover</h3> <p>Hovering over a type now shows a summary of its methods.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/golang/tools/commit/7261b3269227f2c7636f7d4316ed3dd5122d17ff"><code>7261b32</code></a> gopls/internal/regtest: fix goimports on windows when using vendoring</li> <li><a href="https://github.com/golang/tools/commit/41e4e565498859435a2ad44a71cf6701a6afb585"><code>41e4e56</code></a> gopls/internal/lsp/source/completion: ensuring completion completeness</li> <li><a href="https://github.com/golang/tools/commit/ac2946029ad3806349fa00546449da9f59320e89"><code>ac29460</code></a> go/ssa: fix bug in writeSignature on external functions</li> <li><a href="https://github.com/golang/tools/commit/3b62e7e25641fc2dabe915a738906d0779724bf1"><code>3b62e7e</code></a> go/ssa: use core type within (*builder).receiver</li> <li><a href="https://github.com/golang/tools/commit/f394d451f85a030254df453bf84a450b228c4250"><code>f394d45</code></a> gopls/internal/lsp/cache: compute xrefs and methodsets asynchronously</li> <li><a href="https://github.com/golang/tools/commit/27dbf85279a5e6e906a8c1b5cc5b73e8229a8efa"><code>27dbf85</code></a> go.mod: update golang.org/x dependencies</li> <li><a href="https://github.com/golang/tools/commit/c6c983054920f47ed9e5ba1b55a7a5934dd8bf53"><code>c6c9830</code></a> go/types/objectpath: memoize scope lookup in objectpath.Encoder</li> <li><a href="https://github.com/golang/tools/commit/0245e1dfc6b09a30ad018bdcdadef4961067cfd4"><code>0245e1d</code></a> gopls/internal/regtest/codelens: set GOWORK=off for go mod vendor</li> <li><a href="https://github.com/golang/tools/commit/85be8882c905a9b24abcec8363e48a14ad5cd4e2"><code>85be888</code></a> go/analysis/passes/defers: add analyser for defer mistake</li> <li><a href="https://github.com/golang/tools/commit/c43232f868439dcfd25d98501dafa5e695cd1d35"><code>c43232f</code></a> cmd/digraph: improve examples using go list, mod</li> <li>Additional commits viewable in <a href="https://github.com/golang/tools/compare/v0.9.3...v0.10.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.9.3&new-version=0.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR 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>
…s/@jsii/go-runtime-test/project (#4151) Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.9.3 to 0.10.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> <h2>gopls/v0.10.0</h2> <p>This release contains initial support for standalone packages and package renaming. Please see below for more details.</p> <p>We are also changing our release policy to better align with semver.</p> <h2>Support changes</h2> <p>This version of gopls contains changes to our release policy, deprecates support for some older Go versions, and deprecates support for several experimental features.</p> <h3>New release policy</h3> <p>As described in <a href="https://redirect.github.com/golang/go/issues/55267">golang/go#55267</a>, we are tightening our release policy to better follow semver, increase stability, and reduce release-related toil. Significant new features will only be introduced in <code>*.*.0</code> patch versions, and subsequent patch releases will consist only of bugfixes. For example, this version (v0.10.0) introduces several new features, described below. Subsequent v0.10.* releases will contain only bugfixes.</p> <h3>Final support for Go 1.13-1.15</h3> <p>Consistent with the above release policy and our stated <a href="https://github.com/golang/tools/tree/master/gopls#supported-go-versions-and-build-systems">support window</a>, the <code>v0.10.*</code> minor version will be the final set of releases to support being used with Go 1.13-1.15. See <a href="https://redirect.github.com/golang/go/issues/52982">golang/go#52982</a> for details.</p> <p>Gopls will pop up a warning if it resolves a version of the <code>go</code> command that is older than 1.16. Starting with gopls@v0.11.0, gopls will cease to function when used with a <code>go</code> command with a version older than 1.16.</p> <h3>Deprecated experimental features</h3> <p>The following experimental features are deprecated, and will be removed in gopls@v0.11.0:</p> <ul> <li><strong>experimentalWorkspaceModule</strong><code>golang/go#52897</code><code>go.work</code> files. See our <a href="https://github.com/golang/tools/blob/master/gopls/doc/workspace.md#go-workspaces-go-118">documentation</a> for information on how to use <code>go.work</code> files to work on multiple modules.</li> <li><strong>experimentalWatchedFileDelay</strong><code>golang/go#55268</code><code>workspace/didChangeWatchedFiles</code> notifications.</li> <li><strong>experimentalUseInvalidMetadata</strong><code>golang/go#54180</code></li> </ul> <h2>New Features</h2> <h3>Support for "standalone packages"</h3> <p>Gopls now recognizes certain files as "standalone main packages", meaning they should be interpreted as main packages consisting of a single file. To do this, gopls looks for packages named <code>main</code> containing a single build constraint that matches one of the tags configured by the new <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#standalonetags-string"><code>standaloneTags</code></a> setting.</p> <p>This enables cross references and other features when working in a file such as the example below that contains a <code>//go:build ignore</code> build constraint.</p> <p><img src="https://user-images.githubusercontent.com/57144380/197039428-72d78300-cbea-4abe-a408-e171991094b8.png" alt="image" /></p> <h3>(preview) Support for package renaming</h3> <p><code>golang/go#41567</code><a href="https://redirect.github.com/golang/go/issues/56184">golang/go#56184</a>.</p> <p>To rename a package, initiate a rename request on the package clause of a file in the package: <img src="https://user-images.githubusercontent.com/57144380/197041786-bf9e617c-9961-46ae-b21a-c240a18a3014.png" alt="image" /></p> <p>When this renaming is applied, gopls will adjust other package files accordingly, rename the package directory, and update import paths referencing the current package or any nested package in the renamed directory. <img src="https://user-images.githubusercontent.com/57144380/197042160-e034e38d-3cd3-4c62-b912-747d8dc2f4ff.png" alt="image" /></p> <h3>Method information in hover</h3> <p>Hovering over a type now shows a summary of its methods.</p> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/golang/tools/commit/7261b3269227f2c7636f7d4316ed3dd5122d17ff"><code>7261b32</code></a> gopls/internal/regtest: fix goimports on windows when using vendoring</li> <li><a href="https://github.com/golang/tools/commit/41e4e565498859435a2ad44a71cf6701a6afb585"><code>41e4e56</code></a> gopls/internal/lsp/source/completion: ensuring completion completeness</li> <li><a href="https://github.com/golang/tools/commit/ac2946029ad3806349fa00546449da9f59320e89"><code>ac29460</code></a> go/ssa: fix bug in writeSignature on external functions</li> <li><a href="https://github.com/golang/tools/commit/3b62e7e25641fc2dabe915a738906d0779724bf1"><code>3b62e7e</code></a> go/ssa: use core type within (*builder).receiver</li> <li><a href="https://github.com/golang/tools/commit/f394d451f85a030254df453bf84a450b228c4250"><code>f394d45</code></a> gopls/internal/lsp/cache: compute xrefs and methodsets asynchronously</li> <li><a href="https://github.com/golang/tools/commit/27dbf85279a5e6e906a8c1b5cc5b73e8229a8efa"><code>27dbf85</code></a> go.mod: update golang.org/x dependencies</li> <li><a href="https://github.com/golang/tools/commit/c6c983054920f47ed9e5ba1b55a7a5934dd8bf53"><code>c6c9830</code></a> go/types/objectpath: memoize scope lookup in objectpath.Encoder</li> <li><a href="https://github.com/golang/tools/commit/0245e1dfc6b09a30ad018bdcdadef4961067cfd4"><code>0245e1d</code></a> gopls/internal/regtest/codelens: set GOWORK=off for go mod vendor</li> <li><a href="https://github.com/golang/tools/commit/85be8882c905a9b24abcec8363e48a14ad5cd4e2"><code>85be888</code></a> go/analysis/passes/defers: add analyser for defer mistake</li> <li><a href="https://github.com/golang/tools/commit/c43232f868439dcfd25d98501dafa5e695cd1d35"><code>c43232f</code></a> cmd/digraph: improve examples using go list, mod</li> <li>Additional commits viewable in <a href="https://github.com/golang/tools/compare/v0.9.3...v0.10.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.9.3&new-version=0.10.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>
…s/@jsii/go-runtime/jsii-runtime-go (#4150) Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.9.3 to 0.10.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> <h2>gopls/v0.10.0</h2> <p>This release contains initial support for standalone packages and package renaming. Please see below for more details.</p> <p>We are also changing our release policy to better align with semver.</p> <h2>Support changes</h2> <p>This version of gopls contains changes to our release policy, deprecates support for some older Go versions, and deprecates support for several experimental features.</p> <h3>New release policy</h3> <p>As described in <a href="https://redirect.github.com/golang/go/issues/55267">golang/go#55267</a>, we are tightening our release policy to better follow semver, increase stability, and reduce release-related toil. Significant new features will only be introduced in <code>*.*.0</code> patch versions, and subsequent patch releases will consist only of bugfixes. For example, this version (v0.10.0) introduces several new features, described below. Subsequent v0.10.* releases will contain only bugfixes.</p> <h3>Final support for Go 1.13-1.15</h3> <p>Consistent with the above release policy and our stated <a href="https://github.com/golang/tools/tree/master/gopls#supported-go-versions-and-build-systems">support window</a>, the <code>v0.10.*</code> minor version will be the final set of releases to support being used with Go 1.13-1.15. See <a href="https://redirect.github.com/golang/go/issues/52982">golang/go#52982</a> for details.</p> <p>Gopls will pop up a warning if it resolves a version of the <code>go</code> command that is older than 1.16. Starting with gopls@v0.11.0, gopls will cease to function when used with a <code>go</code> command with a version older than 1.16.</p> <h3>Deprecated experimental features</h3> <p>The following experimental features are deprecated, and will be removed in gopls@v0.11.0:</p> <ul> <li><strong>experimentalWorkspaceModule</strong><code>golang/go#52897</code><code>go.work</code> files. See our <a href="https://github.com/golang/tools/blob/master/gopls/doc/workspace.md#go-workspaces-go-118">documentation</a> for information on how to use <code>go.work</code> files to work on multiple modules.</li> <li><strong>experimentalWatchedFileDelay</strong><code>golang/go#55268</code><code>workspace/didChangeWatchedFiles</code> notifications.</li> <li><strong>experimentalUseInvalidMetadata</strong><code>golang/go#54180</code></li> </ul> <h2>New Features</h2> <h3>Support for "standalone packages"</h3> <p>Gopls now recognizes certain files as "standalone main packages", meaning they should be interpreted as main packages consisting of a single file. To do this, gopls looks for packages named <code>main</code> containing a single build constraint that matches one of the tags configured by the new <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#standalonetags-string"><code>standaloneTags</code></a> setting.</p> <p>This enables cross references and other features when working in a file such as the example below that contains a <code>//go:build ignore</code> build constraint.</p> <p><img src="https://user-images.githubusercontent.com/57144380/197039428-72d78300-cbea-4abe-a408-e171991094b8.png" alt="image" /></p> <h3>(preview) Support for package renaming</h3> <p><code>golang/go#41567</code><a href="https://redirect.github.com/golang/go/issues/56184">golang/go#56184</a>.</p> <p>To rename a package, initiate a rename request on the package clause of a file in the package: <img src="https://user-images.githubusercontent.com/57144380/197041786-bf9e617c-9961-46ae-b21a-c240a18a3014.png" alt="image" /></p> <p>When this renaming is applied, gopls will adjust other package files accordingly, rename the package directory, and update import paths referencing the current package or any nested package in the renamed directory. <img src="https://user-images.githubusercontent.com/57144380/197042160-e034e38d-3cd3-4c62-b912-747d8dc2f4ff.png" alt="image" /></p> <h3>Method information in hover</h3> <p>Hovering over a type now shows a summary of its methods.</p> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/golang/tools/commit/7261b3269227f2c7636f7d4316ed3dd5122d17ff"><code>7261b32</code></a> gopls/internal/regtest: fix goimports on windows when using vendoring</li> <li><a href="https://github.com/golang/tools/commit/41e4e565498859435a2ad44a71cf6701a6afb585"><code>41e4e56</code></a> gopls/internal/lsp/source/completion: ensuring completion completeness</li> <li><a href="https://github.com/golang/tools/commit/ac2946029ad3806349fa00546449da9f59320e89"><code>ac29460</code></a> go/ssa: fix bug in writeSignature on external functions</li> <li><a href="https://github.com/golang/tools/commit/3b62e7e25641fc2dabe915a738906d0779724bf1"><code>3b62e7e</code></a> go/ssa: use core type within (*builder).receiver</li> <li><a href="https://github.com/golang/tools/commit/f394d451f85a030254df453bf84a450b228c4250"><code>f394d45</code></a> gopls/internal/lsp/cache: compute xrefs and methodsets asynchronously</li> <li><a href="https://github.com/golang/tools/commit/27dbf85279a5e6e906a8c1b5cc5b73e8229a8efa"><code>27dbf85</code></a> go.mod: update golang.org/x dependencies</li> <li><a href="https://github.com/golang/tools/commit/c6c983054920f47ed9e5ba1b55a7a5934dd8bf53"><code>c6c9830</code></a> go/types/objectpath: memoize scope lookup in objectpath.Encoder</li> <li><a href="https://github.com/golang/tools/commit/0245e1dfc6b09a30ad018bdcdadef4961067cfd4"><code>0245e1d</code></a> gopls/internal/regtest/codelens: set GOWORK=off for go mod vendor</li> <li><a href="https://github.com/golang/tools/commit/85be8882c905a9b24abcec8363e48a14ad5cd4e2"><code>85be888</code></a> go/analysis/passes/defers: add analyser for defer mistake</li> <li><a href="https://github.com/golang/tools/commit/c43232f868439dcfd25d98501dafa5e695cd1d35"><code>c43232f</code></a> cmd/digraph: improve examples using go list, mod</li> <li>Additional commits viewable in <a href="https://github.com/golang/tools/compare/v0.9.3...v0.10.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.9.3&new-version=0.10.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>
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.9.3 to 0.10.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> <h2>gopls/v0.10.0</h2> <p>This release contains initial support for standalone packages and package renaming. Please see below for more details.</p> <p>We are also changing our release policy to better align with semver.</p> <h2>Support changes</h2> <p>This version of gopls contains changes to our release policy, deprecates support for some older Go versions, and deprecates support for several experimental features.</p> <h3>New release policy</h3> <p>As described in <a href="https://redirect.github.com/golang/go/issues/55267">golang/go#55267</a>, we are tightening our release policy to better follow semver, increase stability, and reduce release-related toil. Significant new features will only be introduced in <code>*.*.0</code> patch versions, and subsequent patch releases will consist only of bugfixes. For example, this version (v0.10.0) introduces several new features, described below. Subsequent v0.10.* releases will contain only bugfixes.</p> <h3>Final support for Go 1.13-1.15</h3> <p>Consistent with the above release policy and our stated <a href="https://github.com/golang/tools/tree/master/gopls#supported-go-versions-and-build-systems">support window</a>, the <code>v0.10.*</code> minor version will be the final set of releases to support being used with Go 1.13-1.15. See <a href="https://redirect.github.com/golang/go/issues/52982">golang/go#52982</a> for details.</p> <p>Gopls will pop up a warning if it resolves a version of the <code>go</code> command that is older than 1.16. Starting with gopls@v0.11.0, gopls will cease to function when used with a <code>go</code> command with a version older than 1.16.</p> <h3>Deprecated experimental features</h3> <p>The following experimental features are deprecated, and will be removed in gopls@v0.11.0:</p> <ul> <li><strong>experimentalWorkspaceModule</strong><code>golang/go#52897</code><code>go.work</code> files. See our <a href="https://github.com/golang/tools/blob/master/gopls/doc/workspace.md#go-workspaces-go-118">documentation</a> for information on how to use <code>go.work</code> files to work on multiple modules.</li> <li><strong>experimentalWatchedFileDelay</strong><code>golang/go#55268</code><code>workspace/didChangeWatchedFiles</code> notifications.</li> <li><strong>experimentalUseInvalidMetadata</strong><code>golang/go#54180</code></li> </ul> <h2>New Features</h2> <h3>Support for "standalone packages"</h3> <p>Gopls now recognizes certain files as "standalone main packages", meaning they should be interpreted as main packages consisting of a single file. To do this, gopls looks for packages named <code>main</code> containing a single build constraint that matches one of the tags configured by the new <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#standalonetags-string"><code>standaloneTags</code></a> setting.</p> <p>This enables cross references and other features when working in a file such as the example below that contains a <code>//go:build ignore</code> build constraint.</p> <p><img src="https://user-images.githubusercontent.com/57144380/197039428-72d78300-cbea-4abe-a408-e171991094b8.png" alt="image" /></p> <h3>(preview) Support for package renaming</h3> <p><code>golang/go#41567</code><a href="https://redirect.github.com/golang/go/issues/56184">golang/go#56184</a>.</p> <p>To rename a package, initiate a rename request on the package clause of a file in the package: <img src="https://user-images.githubusercontent.com/57144380/197041786-bf9e617c-9961-46ae-b21a-c240a18a3014.png" alt="image" /></p> <p>When this renaming is applied, gopls will adjust other package files accordingly, rename the package directory, and update import paths referencing the current package or any nested package in the renamed directory. <img src="https://user-images.githubusercontent.com/57144380/197042160-e034e38d-3cd3-4c62-b912-747d8dc2f4ff.png" alt="image" /></p> <h3>Method information in hover</h3> <p>Hovering over a type now shows a summary of its methods.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/golang/tools/commit/7261b3269227f2c7636f7d4316ed3dd5122d17ff"><code>7261b32</code></a> gopls/internal/regtest: fix goimports on windows when using vendoring</li> <li><a href="https://github.com/golang/tools/commit/41e4e565498859435a2ad44a71cf6701a6afb585"><code>41e4e56</code></a> gopls/internal/lsp/source/completion: ensuring completion completeness</li> <li><a href="https://github.com/golang/tools/commit/ac2946029ad3806349fa00546449da9f59320e89"><code>ac29460</code></a> go/ssa: fix bug in writeSignature on external functions</li> <li><a href="https://github.com/golang/tools/commit/3b62e7e25641fc2dabe915a738906d0779724bf1"><code>3b62e7e</code></a> go/ssa: use core type within (*builder).receiver</li> <li><a href="https://github.com/golang/tools/commit/f394d451f85a030254df453bf84a450b228c4250"><code>f394d45</code></a> gopls/internal/lsp/cache: compute xrefs and methodsets asynchronously</li> <li><a href="https://github.com/golang/tools/commit/27dbf85279a5e6e906a8c1b5cc5b73e8229a8efa"><code>27dbf85</code></a> go.mod: update golang.org/x dependencies</li> <li><a href="https://github.com/golang/tools/commit/c6c983054920f47ed9e5ba1b55a7a5934dd8bf53"><code>c6c9830</code></a> go/types/objectpath: memoize scope lookup in objectpath.Encoder</li> <li><a href="https://github.com/golang/tools/commit/0245e1dfc6b09a30ad018bdcdadef4961067cfd4"><code>0245e1d</code></a> gopls/internal/regtest/codelens: set GOWORK=off for go mod vendor</li> <li><a href="https://github.com/golang/tools/commit/85be8882c905a9b24abcec8363e48a14ad5cd4e2"><code>85be888</code></a> go/analysis/passes/defers: add analyser for defer mistake</li> <li><a href="https://github.com/golang/tools/commit/c43232f868439dcfd25d98501dafa5e695cd1d35"><code>c43232f</code></a> cmd/digraph: improve examples using go list, mod</li> <li>Additional commits viewable in <a href="https://github.com/golang/tools/compare/v0.9.3...v0.10.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.9.3&new-version=0.10.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> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
29: build(deps): bump golang.org/x/tools from 0.8.0 to 0.10.0 r=xen0n a=dependabot[bot] Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.8.0 to 0.10.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> <h2>gopls/v0.10.0</h2> <p>This release contains initial support for standalone packages and package renaming. Please see below for more details.</p> <p>We are also changing our release policy to better align with semver.</p> <h2>Support changes</h2> <p>This version of gopls contains changes to our release policy, deprecates support for some older Go versions, and deprecates support for several experimental features.</p> <h3>New release policy</h3> <p>As described in <a href="https://redirect.github.com/golang/go/issues/55267">golang/go#55267</a>, we are tightening our release policy to better follow semver, increase stability, and reduce release-related toil. Significant new features will only be introduced in <code>*.*.0</code> patch versions, and subsequent patch releases will consist only of bugfixes. For example, this version (v0.10.0) introduces several new features, described below. Subsequent v0.10.* releases will contain only bugfixes.</p> <h3>Final support for Go 1.13-1.15</h3> <p>Consistent with the above release policy and our stated <a href="https://github.com/golang/tools/tree/master/gopls#supported-go-versions-and-build-systems">support window</a>, the <code>v0.10.*</code> minor version will be the final set of releases to support being used with Go 1.13-1.15. See <a href="https://redirect.github.com/golang/go/issues/52982">golang/go#52982</a> for details.</p> <p>Gopls will pop up a warning if it resolves a version of the <code>go</code> command that is older than 1.16. Starting with gopls@v0.11.0, gopls will cease to function when used with a <code>go</code> command with a version older than 1.16.</p> <h3>Deprecated experimental features</h3> <p>The following experimental features are deprecated, and will be removed in gopls@v0.11.0:</p> <ul> <li><strong>experimentalWorkspaceModule</strong><code>golang/go#52897</code><code>go.work</code> files. See our <a href="https://github.com/golang/tools/blob/master/gopls/doc/workspace.md#go-workspaces-go-118">documentation</a> for information on how to use <code>go.work</code> files to work on multiple modules.</li> <li><strong>experimentalWatchedFileDelay</strong><code>golang/go#55268</code><code>workspace/didChangeWatchedFiles</code> notifications.</li> <li><strong>experimentalUseInvalidMetadata</strong><code>golang/go#54180</code></li> </ul> <h2>New Features</h2> <h3>Support for "standalone packages"</h3> <p>Gopls now recognizes certain files as "standalone main packages", meaning they should be interpreted as main packages consisting of a single file. To do this, gopls looks for packages named <code>main</code> containing a single build constraint that matches one of the tags configured by the new <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#standalonetags-string"><code>standaloneTags</code></a> setting.</p> <p>This enables cross references and other features when working in a file such as the example below that contains a <code>//go:build ignore</code> build constraint.</p> <p><img src="https://user-images.githubusercontent.com/57144380/197039428-72d78300-cbea-4abe-a408-e171991094b8.png" alt="image" /></p> <h3>(preview) Support for package renaming</h3> <p><code>golang/go#41567</code><a href="https://redirect.github.com/golang/go/issues/56184">golang/go#56184</a>.</p> <p>To rename a package, initiate a rename request on the package clause of a file in the package: <img src="https://user-images.githubusercontent.com/57144380/197041786-bf9e617c-9961-46ae-b21a-c240a18a3014.png" alt="image" /></p> <p>When this renaming is applied, gopls will adjust other package files accordingly, rename the package directory, and update import paths referencing the current package or any nested package in the renamed directory. <img src="https://user-images.githubusercontent.com/57144380/197042160-e034e38d-3cd3-4c62-b912-747d8dc2f4ff.png" alt="image" /></p> <h3>Method information in hover</h3> <p>Hovering over a type now shows a summary of its methods.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/golang/tools/commit/7261b3269227f2c7636f7d4316ed3dd5122d17ff"><code>7261b32</code></a> gopls/internal/regtest: fix goimports on windows when using vendoring</li> <li><a href="https://github.com/golang/tools/commit/41e4e565498859435a2ad44a71cf6701a6afb585"><code>41e4e56</code></a> gopls/internal/lsp/source/completion: ensuring completion completeness</li> <li><a href="https://github.com/golang/tools/commit/ac2946029ad3806349fa00546449da9f59320e89"><code>ac29460</code></a> go/ssa: fix bug in writeSignature on external functions</li> <li><a href="https://github.com/golang/tools/commit/3b62e7e25641fc2dabe915a738906d0779724bf1"><code>3b62e7e</code></a> go/ssa: use core type within (*builder).receiver</li> <li><a href="https://github.com/golang/tools/commit/f394d451f85a030254df453bf84a450b228c4250"><code>f394d45</code></a> gopls/internal/lsp/cache: compute xrefs and methodsets asynchronously</li> <li><a href="https://github.com/golang/tools/commit/27dbf85279a5e6e906a8c1b5cc5b73e8229a8efa"><code>27dbf85</code></a> go.mod: update golang.org/x dependencies</li> <li><a href="https://github.com/golang/tools/commit/c6c983054920f47ed9e5ba1b55a7a5934dd8bf53"><code>c6c9830</code></a> go/types/objectpath: memoize scope lookup in objectpath.Encoder</li> <li><a href="https://github.com/golang/tools/commit/0245e1dfc6b09a30ad018bdcdadef4961067cfd4"><code>0245e1d</code></a> gopls/internal/regtest/codelens: set GOWORK=off for go mod vendor</li> <li><a href="https://github.com/golang/tools/commit/85be8882c905a9b24abcec8363e48a14ad5cd4e2"><code>85be888</code></a> go/analysis/passes/defers: add analyser for defer mistake</li> <li><a href="https://github.com/golang/tools/commit/c43232f868439dcfd25d98501dafa5e695cd1d35"><code>c43232f</code></a> cmd/digraph: improve examples using go list, mod</li> <li>Additional commits viewable in <a href="https://github.com/golang/tools/compare/v0.8.0...v0.10.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.8.0&new-version=0.10.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> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…1097) Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.9.3 to 0.10.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> <h2>gopls/v0.10.0</h2> <p>This release contains initial support for standalone packages and package renaming. Please see below for more details.</p> <p>We are also changing our release policy to better align with semver.</p> <h2>Support changes</h2> <p>This version of gopls contains changes to our release policy, deprecates support for some older Go versions, and deprecates support for several experimental features.</p> <h3>New release policy</h3> <p>As described in <a href="https://redirect.github.com/golang/go/issues/55267">golang/go#55267</a>, we are tightening our release policy to better follow semver, increase stability, and reduce release-related toil. Significant new features will only be introduced in <code>*.*.0</code> patch versions, and subsequent patch releases will consist only of bugfixes. For example, this version (v0.10.0) introduces several new features, described below. Subsequent v0.10.* releases will contain only bugfixes.</p> <h3>Final support for Go 1.13-1.15</h3> <p>Consistent with the above release policy and our stated <a href="https://github.com/golang/tools/tree/master/gopls#supported-go-versions-and-build-systems">support window</a>, the <code>v0.10.*</code> minor version will be the final set of releases to support being used with Go 1.13-1.15. See <a href="https://redirect.github.com/golang/go/issues/52982">golang/go#52982</a> for details.</p> <p>Gopls will pop up a warning if it resolves a version of the <code>go</code> command that is older than 1.16. Starting with gopls@v0.11.0, gopls will cease to function when used with a <code>go</code> command with a version older than 1.16.</p> <h3>Deprecated experimental features</h3> <p>The following experimental features are deprecated, and will be removed in gopls@v0.11.0:</p> <ul> <li><strong>experimentalWorkspaceModule</strong><code>golang/go#52897</code><code>go.work</code> files. See our <a href="https://github.com/golang/tools/blob/master/gopls/doc/workspace.md#go-workspaces-go-118">documentation</a> for information on how to use <code>go.work</code> files to work on multiple modules.</li> <li><strong>experimentalWatchedFileDelay</strong><code>golang/go#55268</code><code>workspace/didChangeWatchedFiles</code> notifications.</li> <li><strong>experimentalUseInvalidMetadata</strong><code>golang/go#54180</code></li> </ul> <h2>New Features</h2> <h3>Support for "standalone packages"</h3> <p>Gopls now recognizes certain files as "standalone main packages", meaning they should be interpreted as main packages consisting of a single file. To do this, gopls looks for packages named <code>main</code> containing a single build constraint that matches one of the tags configured by the new <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#standalonetags-string"><code>standaloneTags</code></a> setting.</p> <p>This enables cross references and other features when working in a file such as the example below that contains a <code>//go:build ignore</code> build constraint.</p> <p><img src="https://user-images.githubusercontent.com/57144380/197039428-72d78300-cbea-4abe-a408-e171991094b8.png" alt="image" /></p> <h3>(preview) Support for package renaming</h3> <p><code>golang/go#41567</code><a href="https://redirect.github.com/golang/go/issues/56184">golang/go#56184</a>.</p> <p>To rename a package, initiate a rename request on the package clause of a file in the package: <img src="https://user-images.githubusercontent.com/57144380/197041786-bf9e617c-9961-46ae-b21a-c240a18a3014.png" alt="image" /></p> <p>When this renaming is applied, gopls will adjust other package files accordingly, rename the package directory, and update import paths referencing the current package or any nested package in the renamed directory. <img src="https://user-images.githubusercontent.com/57144380/197042160-e034e38d-3cd3-4c62-b912-747d8dc2f4ff.png" alt="image" /></p> <h3>Method information in hover</h3> <p>Hovering over a type now shows a summary of its methods.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/golang/tools/commit/7261b3269227f2c7636f7d4316ed3dd5122d17ff"><code>7261b32</code></a> gopls/internal/regtest: fix goimports on windows when using vendoring</li> <li><a href="https://github.com/golang/tools/commit/41e4e565498859435a2ad44a71cf6701a6afb585"><code>41e4e56</code></a> gopls/internal/lsp/source/completion: ensuring completion completeness</li> <li><a href="https://github.com/golang/tools/commit/ac2946029ad3806349fa00546449da9f59320e89"><code>ac29460</code></a> go/ssa: fix bug in writeSignature on external functions</li> <li><a href="https://github.com/golang/tools/commit/3b62e7e25641fc2dabe915a738906d0779724bf1"><code>3b62e7e</code></a> go/ssa: use core type within (*builder).receiver</li> <li><a href="https://github.com/golang/tools/commit/f394d451f85a030254df453bf84a450b228c4250"><code>f394d45</code></a> gopls/internal/lsp/cache: compute xrefs and methodsets asynchronously</li> <li><a href="https://github.com/golang/tools/commit/27dbf85279a5e6e906a8c1b5cc5b73e8229a8efa"><code>27dbf85</code></a> go.mod: update golang.org/x dependencies</li> <li><a href="https://github.com/golang/tools/commit/c6c983054920f47ed9e5ba1b55a7a5934dd8bf53"><code>c6c9830</code></a> go/types/objectpath: memoize scope lookup in objectpath.Encoder</li> <li><a href="https://github.com/golang/tools/commit/0245e1dfc6b09a30ad018bdcdadef4961067cfd4"><code>0245e1d</code></a> gopls/internal/regtest/codelens: set GOWORK=off for go mod vendor</li> <li><a href="https://github.com/golang/tools/commit/85be8882c905a9b24abcec8363e48a14ad5cd4e2"><code>85be888</code></a> go/analysis/passes/defers: add analyser for defer mistake</li> <li><a href="https://github.com/golang/tools/commit/c43232f868439dcfd25d98501dafa5e695cd1d35"><code>c43232f</code></a> cmd/digraph: improve examples using go list, mod</li> <li>Additional commits viewable in <a href="https://github.com/golang/tools/compare/v0.9.3...v0.10.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.9.3&new-version=0.10.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> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.9.3 to 0.10.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> <h2>gopls/v0.10.0</h2> <p>This release contains initial support for standalone packages and package renaming. Please see below for more details.</p> <p>We are also changing our release policy to better align with semver.</p> <h2>Support changes</h2> <p>This version of gopls contains changes to our release policy, deprecates support for some older Go versions, and deprecates support for several experimental features.</p> <h3>New release policy</h3> <p>As described in <a href="https://redirect.github.com/golang/go/issues/55267">golang/go#55267</a>, we are tightening our release policy to better follow semver, increase stability, and reduce release-related toil. Significant new features will only be introduced in <code>*.*.0</code> patch versions, and subsequent patch releases will consist only of bugfixes. For example, this version (v0.10.0) introduces several new features, described below. Subsequent v0.10.* releases will contain only bugfixes.</p> <h3>Final support for Go 1.13-1.15</h3> <p>Consistent with the above release policy and our stated <a href="https://github.com/golang/tools/tree/master/gopls#supported-go-versions-and-build-systems">support window</a>, the <code>v0.10.*</code> minor version will be the final set of releases to support being used with Go 1.13-1.15. See <a href="https://redirect.github.com/golang/go/issues/52982">golang/go#52982</a> for details.</p> <p>Gopls will pop up a warning if it resolves a version of the <code>go</code> command that is older than 1.16. Starting with gopls@v0.11.0, gopls will cease to function when used with a <code>go</code> command with a version older than 1.16.</p> <h3>Deprecated experimental features</h3> <p>The following experimental features are deprecated, and will be removed in gopls@v0.11.0:</p> <ul> <li><strong>experimentalWorkspaceModule</strong><code>golang/go#52897</code><code>go.work</code> files. See our <a href="https://github.com/golang/tools/blob/master/gopls/doc/workspace.md#go-workspaces-go-118">documentation</a> for information on how to use <code>go.work</code> files to work on multiple modules.</li> <li><strong>experimentalWatchedFileDelay</strong><code>golang/go#55268</code><code>workspace/didChangeWatchedFiles</code> notifications.</li> <li><strong>experimentalUseInvalidMetadata</strong><code>golang/go#54180</code></li> </ul> <h2>New Features</h2> <h3>Support for "standalone packages"</h3> <p>Gopls now recognizes certain files as "standalone main packages", meaning they should be interpreted as main packages consisting of a single file. To do this, gopls looks for packages named <code>main</code> containing a single build constraint that matches one of the tags configured by the new <a href="https://github.com/golang/tools/blob/master/gopls/doc/settings.md#standalonetags-string"><code>standaloneTags</code></a> setting.</p> <p>This enables cross references and other features when working in a file such as the example below that contains a <code>//go:build ignore</code> build constraint.</p> <p><img src="https://user-images.githubusercontent.com/57144380/197039428-72d78300-cbea-4abe-a408-e171991094b8.png" alt="image" /></p> <h3>(preview) Support for package renaming</h3> <p><code>golang/go#41567</code><a href="https://redirect.github.com/golang/go/issues/56184">golang/go#56184</a>.</p> <p>To rename a package, initiate a rename request on the package clause of a file in the package: <img src="https://user-images.githubusercontent.com/57144380/197041786-bf9e617c-9961-46ae-b21a-c240a18a3014.png" alt="image" /></p> <p>When this renaming is applied, gopls will adjust other package files accordingly, rename the package directory, and update import paths referencing the current package or any nested package in the renamed directory. <img src="https://user-images.githubusercontent.com/57144380/197042160-e034e38d-3cd3-4c62-b912-747d8dc2f4ff.png" alt="image" /></p> <h3>Method information in hover</h3> <p>Hovering over a type now shows a summary of its methods.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/golang/tools/commit/7261b3269227f2c7636f7d4316ed3dd5122d17ff"><code>7261b32</code></a> gopls/internal/regtest: fix goimports on windows when using vendoring</li> <li><a href="https://github.com/golang/tools/commit/41e4e565498859435a2ad44a71cf6701a6afb585"><code>41e4e56</code></a> gopls/internal/lsp/source/completion: ensuring completion completeness</li> <li><a href="https://github.com/golang/tools/commit/ac2946029ad3806349fa00546449da9f59320e89"><code>ac29460</code></a> go/ssa: fix bug in writeSignature on external functions</li> <li><a href="https://github.com/golang/tools/commit/3b62e7e25641fc2dabe915a738906d0779724bf1"><code>3b62e7e</code></a> go/ssa: use core type within (*builder).receiver</li> <li><a href="https://github.com/golang/tools/commit/f394d451f85a030254df453bf84a450b228c4250"><code>f394d45</code></a> gopls/internal/lsp/cache: compute xrefs and methodsets asynchronously</li> <li><a href="https://github.com/golang/tools/commit/27dbf85279a5e6e906a8c1b5cc5b73e8229a8efa"><code>27dbf85</code></a> go.mod: update golang.org/x dependencies</li> <li><a href="https://github.com/golang/tools/commit/c6c983054920f47ed9e5ba1b55a7a5934dd8bf53"><code>c6c9830</code></a> go/types/objectpath: memoize scope lookup in objectpath.Encoder</li> <li><a href="https://github.com/golang/tools/commit/0245e1dfc6b09a30ad018bdcdadef4961067cfd4"><code>0245e1d</code></a> gopls/internal/regtest/codelens: set GOWORK=off for go mod vendor</li> <li><a href="https://github.com/golang/tools/commit/85be8882c905a9b24abcec8363e48a14ad5cd4e2"><code>85be888</code></a> go/analysis/passes/defers: add analyser for defer mistake</li> <li><a href="https://github.com/golang/tools/commit/c43232f868439dcfd25d98501dafa5e695cd1d35"><code>c43232f</code></a> cmd/digraph: improve examples using go list, mod</li> <li>Additional commits viewable in <a href="https://github.com/golang/tools/compare/v0.9.3...v0.10.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.9.3&new-version=0.10.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> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Discovered while investigating #54147: with "experimentalUseInvalidMetadata" set, we may diagnose a package with invalid metadata, and not re-diagnose when new metadata arrives. This can lead to diagnostics which are stale until you begin typing again.
We could fix this by re-diagnosing after each metadata load, but more generally we should reconsider whether it is worth landing this feature:
Pros:
Cons:
The text was updated successfully, but these errors were encountered: