This release fixes a regression in the v0.9.0 release: a crash when running the go:generategolang/go#53781
Thank you to all those who filed crash reports, and apologies for the breakage!
gopls@v0.9.0
This release contains significant performance improvements (especially in incremental processing after source changes), bug fixes, and support for the LSP “inlay hints” feature, along with several other minor enhancements.
Performance improvements
Source edits cause gopls to invalidate and recompute information about the workspace, most of which has not changed. Previously, gopls would spend significant CPU copying data structures, sometimes more than 100ms per keystroke in a large workspace. This release includes many optimizations to avoid copying data needlessly, including a new map representation to achieve copying in constant time. Special thanks to @euroelessar for the design and implementation of this data structure.
As a result of these improvements, gopls should be more responsive while typing in large codebases, though it will still use a lot of memory.
Time to process a change notification in the Kubernetes repo:
New Features
Inlay hints
Added support for displaying inlay hints of composite literal field names and types, constant values, function parameter names, function type params, and short variable declarations. You can try these out in the vscode-go nightly by enabling inlay hints settings.
Package References
Find references on package foo now lists locations where the given package is imported.
Quick-fix to add field names to struct literals
A new quick fix adds field names to struct literals with unkeyed fields.
Bug fixes
This release includes the following notable bugfixes:
Fixes for goimports performance and correctness when using a go.work file (#52784)
Fix a crash during renaming in a package that uses generics (#52940)
Fix gopls getting confused when moving a file from the foo_test package to foo package (#45317)
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 from 0.8.0 to 0.9.1.
Release notes
Sourced from golang.org/x/tools's releases.
... (truncated)
Commits
4609d79
cmd/bisect: add -compile and -godebug shorthandsddfa220
internal/fuzzy: improvements to the symbol scoring algorithm3449242
go/types/objectpath: don't panic when receiver is missing a method0809ec2
gopls/internal/lsp/source: document {All,Workspace}Metadata8f7fb01
go/analysis/unitchecker: add test of go vet on std23e52a3
bisect: diagnose bad targets betterd5af889
gopls: set GOWORK=off for loads from debug and safetoken testsc93329a
go/analysis/passes/printf: reshorten diagnostic about %s in Println call6219726
go.mod: update golang.org/x dependenciesf4d143e
go/ssa: cleanup TestGenericBodies to pickup package nameDependabot 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)