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 from 0.9.1 to 0.14.0 #129

Closed

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 20, 2023

Bumps golang.org/x/tools from 0.9.1 to 0.14.0.

Release notes

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

gopls/v0.14.0-pre.4

These are release notes for a prerelease version of gopls. v0.14.0 will be released soon, but please try the prerelease if you can!

go install golang.org/x/tools/[email protected]

This release includes initial support for the "inline call to function" refactoring, as well as a few other smaller features. It also includes several bug fixes, notably a fix for a performance regression in completion that may be significant in some environments.

The release also contains support for opt-in telemetry. If you want, you can enable the periodic uploading of telemetry data, including gopls stack traces and metrics, but never your source code, to telemetry.go.dev. See below for details.

New Features

Refactoring: inline call to function

This release includes a new code action to inline function calls:

inlinecall

While the outcome of this operation may be a simple replacement, there's a lot going on under the covers. For example, the new inliner checks whether changes to the order of argument evaluation could have unintended consequences. If so, it is careful to replicate the original behavior:

add preserves the order of effects ...but sub does not
inline_add inline_sub

The goal of the inliner is to rewrite your code idiomatically without introducing behavior changes. See the inlining documentation for more details.

When the call cannot be reduced to a simple expression, the inliner may fall back on an immediately invoked function literal (func() { statements }()) as this is often the only way to preserve the original behavior. As we continue to work on refactoring, we'll add additional rewriting strategies that avoid this fall-back in more cases.

Refactoring: removing unused parameters

The techniques described in the previous section serve as a foundation for other refactoring operations. As a proof of concept, this release also includes a code action to remove unused parameters. Since this operation uses inlining behind the scenes, it gets all of the related safety checks and rewriting strategies for free:

inline_unused

Improved support for go:embed directives

This release includes improved support for //go:embed directives, including hover and jump-to-definition. embed_def

New analyses

This release include three new static analyses, all of which are enabled by default.

"appends": reports calls to append that pass no values to be appended to the slice. image

"defers": checks for common mistakes in defer statements. image

... (truncated)

Commits
  • 3f4194e go.mod: update golang.org/x dependencies
  • 1e4ce7c internal/refactor/inline: yet more tweaks to everything test
  • ee20ddf internal/refactor/inline: permit return conversions in tailcall
  • db1d1e0 gopls/internal/lsp: go to definition from embed directive
  • 2be977e internal/refactor/inline: work around channel type misformatting
  • 0ba9c84 internal/fuzzy: several improvements for symbol matching
  • c2725ad gopls: update x/telemetry dependency
  • e8722c0 go/types/internal/play: show types.Selection information
  • a819c61 internal/refactor/inline: eliminate unnecessary binding decl
  • 102b64b internal/refactor/inline: tweak everything-test docs again
  • 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 show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @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.9.1 to 0.14.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](golang/tools@v0.9.1...v0.14.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Oct 20, 2023
Copy link
Contributor Author

dependabot bot commented on behalf of github Nov 9, 2023

Superseded by #135.

@dependabot dependabot bot closed this Nov 9, 2023
@dependabot dependabot bot deleted the dependabot/go_modules/golang.org/x/tools-0.14.0 branch November 9, 2023 00:43
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 go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants