Skip to content
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

Bump golang.org/x/tools/gopls from 0.12.4 to 0.13.0 #151

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 31, 2023

Bumps golang.org/x/tools/gopls from 0.12.4 to 0.13.0.

Release notes

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

gopls/v0.13.0

These are release notes are identical to that of gopls@v0.13.0-pre.3. Thanks to all who tested the prerelease!

go install golang.org/x/tools/gopls@v0.13.0-pre.3

This release fixes several bugs and mitigates a few performance regressions. It also somewhat reduces the latency and CPU cost of most operations, and includes a few small additional features.

Performance improvements

While gopls@v0.12.x drastically reduced memory usage, several operations got around 50% slower due to additional I/O reading from the filesystem and time spent decoding indexes. This release optimizes those additional operations to (in most cases) achieve parity or better with the equivalent operation in gopls@v0.11.0. Additionally, this release reduces total CPU while typing or performing common operations.

Faster code actions

This release includes a particularly large performance improvement in the evaluation of code actions (including formatting/goimports on save). In the past, there have been several reasons why this operation was expensive -- VS Code users may recognize the getting code actions from "Go" pop-up. This release fundamentally changes the way code actions are evaluated so that almost all of the work is pre-computed. As a result, formatting and adding or removing imports on save should be much faster.

Analysis performance

A notable exception to CPU performance parity with gopls@v0.11.0 is running static analysis. In this case, the additional cost incurred by gopls@v0.12.x was not a regression, but rather the cost of analyzing many more packages to enable "deep" static analysis (see "Improved static analysis" in the gopls@v0.12.0 release notes.

In smaller repositories, the cost of this additional analysis is negligible -- analysis does not run until you stop typing, and typically just re-evaluates the changed package. However, it was discovered that in large workspaces that import low-level packages with a very large API surface (such as a cloud provider SDK or proto library), certain quadratic factors involved with the encoding/decoding of analysis results can dominate the cost of analysis, and result in enormous resource consumption: overloading the CPU and exhausting all memory.

This release partially mitigates those quadratic factors, significantly reducing their cost and limiting concurrency so that they do not exhaust all resources. However, fully eliminating these factors will require additional work to fix their quadratic nature. Until that is done, analysis may continue to be costly on certain repos, especially if "staticcheck" is enabled (because staticcheck does more deep analysis than the default set of analyzers).

In the meantime, a notification is added to make you aware when analysis is slow, and provide an update on the progress of indexing "deep" analysis results. Canceling this notification will cancel the ongoing analysis, but it will resume after the next change. If you don't want to see these notifications, you can set the new "analysisProgressReporting" setting to "false". image.

New Features

Highlight deprecated symbols

Deprecated symbols and packages are now marked as such. To turn off this feature, disable the "deprecated" analysis.

image

Stub methods to fix missing method errors

The "stubmethods" refactoring is now available as a quick-fix for errors related to missing methods. image

Improvements to function extraction

Function extraction now puts context.Context parameters first in the resulting extracted function. See golang/go#60738 for details.

Improvements to the embeddirective analyzer

The embed directive analyzer now verifies the location of //go:embed directives, and provides a quick-fix to add missing "embed" imports. image

... (truncated)

Commits
  • 0d76b52 gopls: update go.mod for v0.13.0-pre.3
  • 65b14ec all: merge master (03562de) into gopls-release-branch.0.13
  • 03562de refactor/satisfy/find: composite lits may have type parameter type
  • bacac14 gopls/internal/lsp/source: Add SuggestedFix for embeddirective Analyzer
  • 38606b3 gopls/internal/lsp/cache: keep analysis progress reports on one line
  • 0ea602e gopls: update go.mod and go.sum for v0.13.0-pre.2
  • 3ff6127 all: merge master (e8cdaf4) into gopls-release-branch.0.13
  • e8cdaf4 gopls/internal/lsp/cache: fast-path for type-checking active packages
  • da5abd3 gopls/internal/lsp/cache: fix use of time.NewTimer instead of NewTicker
  • b389785 gopls: fix tests that depend on log sequencing
  • 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/gopls](https://github.com/golang/tools) from 0.12.4 to 0.13.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](golang/tools@gopls/v0.12.4...gopls/v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools/gopls
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jul 31, 2023
@jacobbednarz jacobbednarz merged commit 497dff1 into master Aug 1, 2023
6 checks passed
@jacobbednarz jacobbednarz deleted the dependabot/go_modules/golang.org/x/tools/gopls-0.13.0 branch August 1, 2023 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant