Sourced from golang.org/x/tools's releases.
gopls/v0.9.3
Move fast and fix things...
golang/go#54395
As always, thank you for filing issues!
gopls/v0.9.2
This release contains many bug fixes, particularly related to problems that would require restarting gopls.
Note about network usage: among these fixes was a change to allow network usage when reloading the workspace. Reloading occurs when a
go.mod
,go.sum
, orgo.work
file changes on disk. In the past, gopls would only allow network during the first workspace load. This resulted in confusing behavior when, for example, a new dependency is added to ago.mod
file and gopls could not load it, but loading succeeded on restart. See #54069 for more details.Configuration changes
directoryFilters at arbitrary depth
The
"directoryFilters"
setting now supports excluding directories at arbitrary depth, using the**
operator. (note that for v0.9.2, the default value for this setting is still["-node_modules]"
. In the next release, this will change to["-**/node_modules"]
).Bug fixes and Performance improvements...
This release contains the following notable bug fixes / performance improvements:
- Additional change optimization - Following up on the work to optimize change processing from the v0.9.0 release, this release contains additional optimizations that result in around 50% faster change processing (measured via edits in the Kubernetes repo).
- Fix for a long-standing memory leak - #53780 fixed a long-standing bug that caused gopls to hold on to its initial state, gradually leaking memory as state changed during the editing session.
- Fewer restarts - This release contains many fixes for cache-invalidation bugs that would cause gopls to get confused and require restarting. Additionally, see the note at top about enabling the network when reloading the workspace. We believe we are close to our goal that restarting gopls should never be required to fix workspace errors. If you encounter such a bug, please file an issue!
A full list of all issues fixed can be found in the gopls/v0.9.2 milestone. To report a new problem, please file a new issue at https://go.dev/issues/new.
Thank you to our contributors!
Thank you for your contribution,
@alandonovan
,@antoineco
,@dle8
,@euroelessar
,@findleyr
,@hyangah
,@jamalc
,@mssdvd
,@pjweinbgo
,@rentziass
, and@suzmue
!What's next
The next planned gopls release is v0.10.0. We’re excited about features and improvements on the horizon, for example:
0dda7d6
go/pointer: remove replace directive98f1b4d
gopls/internal/lsp/cache: check number of orphaned files after
filteringa260315
go/pointer: create submodule96844c3
cmd/{guru,callgraph}: stop using go/pointercd694d8
go/packages: include
"unsafe".GoFiles=["unsafe.go"]33c741d
gopls/internal/lsp: add min/max builtin933c7cc
internal/lsp/source: use exact match in import highlighting5974258
gopls/internal/lsp: clear vuln diagnostics on config changesf3faea1
go/packages: pass -pgo=off on go1.21 and later5f74ec7
internal/lsp/debug: add links to profiles and GCSourced from golang.org/x/tools's releases.
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 ago
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
go.work
files. See our documentation for information on how to usego.work
files to work on multiple modules.- experimentalWatchedFileDelay
golang/go#55268
workspace/didChangeWatchedFiles
notifications.- experimentalUseInvalidMetadata
golang/go#54180
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 newstandaloneTags
setting.This enables cross references and other features when working in a file such as the example below that contains a
//go:build ignore
build constraint.
(preview) Support for package renaming
golang/go#41567
golang/go#56184.To rename a package, initiate a rename request on the package clause of a file in the package:
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.
Method information in hover
Hovering over a type now shows a summary of its methods.
... (truncated)
7261b32
gopls/internal/regtest: fix goimports on windows when using
vendoring41e4e56
gopls/internal/lsp/source/completion: ensuring completion
completenessac29460
go/ssa: fix bug in writeSignature on external functions3b62e7e
go/ssa: use core type within (*builder).receiverf394d45
gopls/internal/lsp/cache: compute xrefs and methodsets
asynchronously27dbf85
go.mod: update golang.org/x dependenciesc6c9830
go/types/objectpath: memoize scope lookup in objectpath.Encoder0245e1d
gopls/internal/regtest/codelens: set GOWORK=off for go mod vendor85be888
go/analysis/passes/defers: add analyser for defer mistakec43232f
cmd/digraph: improve examples using go list, modSourced from golang.org/x/tools's releases.
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
This release offers two different options for detecting vulnerabilities in dependencies. Both are backed by the Go vulnerability database (https://vuln.go.dev) and complement each other.
- Imports-based scanning, enabled by the
"vulncheck": "Imports"
setting, reports vulnerabilities by scanning the set of packages imported in the workspace. This is fast, but may report more false positives.- Integration of the golang.org/x/vuln/cmd/govulncheck command-line tool performs a more precise analysis based on-call graph reachability, with fewer false positives. Because it is slower to compute, it must be manually triggered by using "Run govulncheck to verify" code actions or the
"codelenses.run_govulncheck"
code lens ongo.mod
files.https://user-images.githubusercontent.com/4999471/206977512-a821107d-9ffb-4456-9b27-6a6a4f900ba6.mp4
Additional checks for the
loopclosure
analyzerThe
loopclosure
analyzer, which reports problematic references from a nested function to a variable of an enclosing loop, has been improved to catch more cases. In particular, it now reports when subtests run in parallel with the loop, a mistake that often results in all but the final test case being skipped.
Configuration changes
- The
"vulncheck"
setting controls vulnerability analysis based on the Go vulnerability database. If set to"Imports"
, gopls will compute diagnostics related to vulnerabilities in dependencies, and will present them in go.mod files.- The
"codelenses.run_govulncheck"
setting controls the presence of code lenses that run the govulncheck command, which takes longer but produces more accurate vulnerability reporting based on call-graph reachability.Bug fixes
This version of gopls includes fixes to several bugs, notably:
golang/go#57053
golang/go#55837
golang/go#56450).golang/go#54816
A full list of all issues fixed can be found in the gopls/v0.11.0 milestone. To report a new problem, please file a new issue at https://go.dev/issues/new.
Thank you to our contributors
@Arsen6331
,@SN9NV
,@adonovan
,@bcmills
,@dle8
,@findleyr
,@hyangah
,@pjweinbgo
,@suzmue
gopls/v0.10.1
This release contains a fix for golang/go#56505: a new crash during method completion on variables of type
*error
.
... (truncated)
675bf3c
go.mod: update golang.org/x dependenciesad52c1c
go/ssa/interp: support conversions to slices of named bytes14ec3c0
gopls/doc/contributing.md: document error handling strategiesc495364
go/packages/gopackages: document -mode flag87ad891
gopls/internal/lsp/source/typerefs: move test into _test.go27fd94e
internal/fastwalk: doc formatting fixes (including godoc links)d362be0
gopls/internal/lsp/filecache: reduce GC frequency969078b
Revert "go/analysis: add Sizes that matches gc size
computations"5aa6acb
go/analysis: add Sizes that matches gc size computations5a89a3b
go/vcs: deleteSourced from actions/upload-pages-artifact's releases.
v2.0.0
Changelog
- :warning: BREAKING CHANGE: Remove built-in
chmod
commands forv2
@JamesMGreene
(#69)- Update README for
v2
@JamesMGreene
(#70)See details of all code changes since previous release.
v1.0.10
Changelog
- readme: fix/improve note about permissions
@tshepang
(#65)- Revert
chmod
removal forv1
@JamesMGreene
(#68)- Add file perms handling
@tsusdere
(#64)See details of all code changes since previous release.
v1.0.9
Removed
chmod
as we moved towards trusting correct file permissions have been set. In the event this isn't the case then we raise an error in the action related to the file permissions.v1.0.8
Changelog
- Fail if no artifact file is found to upload
@JamesMGreene
(#55)- Fix link to releases in README
@waldyrious
(#53)- Bump actions/publish-action from 0.2.1 to 0.2.2
@dependabot
(#47)- Add Dependabot config for Actions usage updates
@JamesMGreene
(#46)See details of all code changes since previous release.
v1.0.7
Changelog
- Don't change file permissions of other files
@KyeRussell
(#44)See details of all code changes since previous release.
v1.0.6
Changelog
- Customize artifact name
@yuradanyliuk
(#41)- Fix permissions
@yoannchaudet
(#42)- Print warnings about changed file permissions in bulk
@TooManyBees
(#38)- Update to latest
actions/publish-action
@JamesMGreene
(#36)See details of all code changes since previous release.
v1.0.5
Changelog
... (truncated)
Sourced from semver's releases.
v5.7.2
5.7.2 (2023-07-10)
Bug Fixes
2f8fd41
#585 better handling of whitespace (#585) (@joaomoreno
,@lukekarrys
)
Sourced from semver's changelog.
5.7.2 (2023-07-10)
Bug Fixes
2f8fd41
#585 better handling of whitespace (#585) (@joaomoreno
,@lukekarrys
)5.7
- Add
minVersion
method5.6
- Move boolean
loose
param to an options object, with backwards-compatibility protection.- Add ability to opt out of special prerelease version handling with the
includePrerelease
option flag.5.5
- Add version coercion capabilities
5.4
- Add intersection checking
5.3
- Add
minSatisfying
method5.2
- Add
prerelease(v)
that returns prerelease components5.1
- Add Backus-Naur for ranges
- Remove excessively cute inspection methods
5.0
- Remove AMD/Browserified build artifacts
- Fix ltr and gtr when using the
*
range- Fix for range
*
with a prerelease identifier
This version was pushed to npm by lukekarrys, a new releaser for semver since your current version.
Sourced from golang.org/x/tools's releases.
gopls/v0.12.0
This release contains a major rewrite of the way gopls computes and stores package information, with the goal of reducing memory usage and allowing gopls to scale to larger repositories. This change can also significantly reduce startup time when workspaces are reopened, as gopls now uses a file-based cache to persist data across sessions. With these optimizations, gopls is finally able to fully analyze dependencies using the golang.org/x/tools/go/analysis framework, resulting in improved accuracy for analysis diagnostics.
You can install this release with
go install
:go install golang.org/x/tools/gopls@v0.12.0
Support changes
As gopls matures, we're trying to simplify its configuration so that gopls Just Works in more scenarios, and so that we have fewer configuration combinations to test. This means that we will be gradually deprecating settings that affect the core behavior of gopls.
Removed experimental configuration options
As announced in the v0.10.0 release notes, this release removes support for the
experimentalWorkspaceModule
andexperimentalWatchedFileDelay
settings. TheexperimentalPackageCacheKey
setting is also removed, as it is irrelevant in the new design.The
experimentalWorkspaceModule
setting in particular may still be in use by some users. This setting has been superseded by built-in support for multi-module workspaces in thego
command, via Go workspaces. To get the equivalent behavior in gopls@v0.12.0, please create ago.work
file in your workspace using all desired modules. To use all modules in your workspace, run:go work use -r .
Dropped support for Go 1.13-1.15, deprecated support for Go 1.16-1.17
As announced in the v0.10.0 release notes, this release drops support for Go 1.13-1.15, and in fact does not build with these Go versions.
Additionally,
gopls@v0.12.x
will be the final sequence of versions supporting Go 1.16-1.17, and therefore displays a deprecation notice when used with these Go versions.Supported operating systems
Given that our users are almost entirely on Linux, Windows, or Darwin, we are discussing narrowing our support to focus on those operating systems, in golang/go#59981.
Performance improvements
The banner feature of this release is an internal redesign that significantly improves the way gopls scales in larger codebases. Performance, particularly memory usage, has long been a pain point for our users.
Reduced memory usage
Previous releases of gopls held typed syntax trees for all packages, in memory, all the time. With this release, these large data structures are ephemeral: as soon as they are constructed, an index of information derived from them is saved persistently to a file-based cache, and the data structures are recycled. The index for each package includes the locations of declaring and referring identifiers; the set of exported declarations and their types; the method sets of each interface; and any diagnostics and facts (see below) produced during analysis. The index holds all the information needed to serve global-scope LSP queries such as “references”, “implementations”, and so on.
Moving package information to a file-based cache greatly reduces the amount of RAM gopls uses, by almost an order of magnitude in larger projects. The table below shows the reductions in steady-state memory usage for three open-source Go repositories.
Project Packages In-use bytes v0.11.0 v0.12.0 Change gopls 405 497MB 232MB -53% kubernetes 3137 3090MB 832MB -73% google-cloud-go + submods 7657 5039MB 863MB -83%
... (truncated)
229f848
gopls/internal/lsp/source: enable new defers analyzer2dc7eba
go/analysis: use parser.SkipObjectResolutionf91c023
go.mod: update golang.org/x dependenciese0783a8
internal/gcimporter: remove bug report on objectpath failure75f6f9c
gopls/internal/bug: add gopls/bug telemetry counter4b271f9
gopls: add gopls/client telemetry countersd0b18e2
go/analysis/passes/copylock: fix infinite recursion5b4d426
gopls/internal/hooks: clean language version before passing to
gofumpt2160c5f
gopls/internal/lsp/analysis: fix stubmethods with variadic
parameters3d20bbe
internal/gcimporter: add a missing return if objectpath fails