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

x/tools/gopls: drop support for building at Go 1.13-15 #52982

Closed
4 tasks done
findleyr opened this issue May 18, 2022 · 1 comment
Closed
4 tasks done

x/tools/gopls: drop support for building at Go 1.13-15 #52982

findleyr opened this issue May 18, 2022 · 1 comment
Assignees
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@findleyr
Copy link
Contributor

findleyr commented May 18, 2022

As described in our support documentation, gopls only supports building with the last four Go versions.

#50825 outlines a long-term plan to remove support for building gopls at legacy Go versions, but in the meantime we should drop support for Go 1.13 and Go 1.14 now that Go 1.18 is released. This issue tracks dropping support for 1.13.

Action items:

  • note the end-of-life for Go 1.13 support in our v0.8.4 release notes
  • check with the VS Code team to update our compatibility matrix
  • document our new compatibility matrix.
  • remove Kokoro 1.13 CI

CC @hyangah

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels May 18, 2022
@gopherbot gopherbot added this to the Unreleased milestone May 18, 2022
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.9.0 May 18, 2022
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue May 28, 2022
New Features

New analyzer for //go:embed comments

Gopls now includes an analyzer for go:embed comment directives. At
the moment, this analyzer checks that the "embed" import is present,
but more analyses are planned for the future. See golang/go#50262
for more information.

Improved hover for imports

Hovering over an imported path now gives you the full package doc.

Final support for Go 1.13

Per our support window, gopls v0.8.4 will be the final gopls release
to support being built with Go 1.13. See golang/go#52982 for details.

Bugfixes and Performance improvements

    Faster symbol indexing. Gopls builds a symbol index the first
    time symbol search is invoked. That indexing should be 3-4x
    faster with this release.

    Improved metadata invalidation (AKA fewer restarts). v0.8.4
    fixes a couple of bugs that lead to gopls getting confused
    about packages and needing to be restarted. We're aware of more
    bugs of this nature, but are working on eliminating the need
    to ever restart gopls.
@findleyr findleyr modified the milestones: gopls/v0.9.0, gopls/later Jun 13, 2022
@findleyr findleyr changed the title x/tools/gopls: drop support for building at Go 1.13 x/tools/gopls: drop support for building at Go 1.13-15 Oct 6, 2022
@findleyr findleyr modified the milestones: gopls/later, gopls/v0.11.0 Oct 6, 2022
mend-for-github-com bot added a commit to DelineaXPM/python-dsv-sdk that referenced this issue Nov 7, 2022
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [golang.org/x/tools/gopls](https://togithub.com/golang/tools) | minor
| `v0.9.5` -> `v0.10.1` |

---

### Release Notes

<details>
<summary>golang/tools</summary>

###
[`v0.10.1`](https://togithub.com/golang/tools/releases/tag/gopls%2Fv0.10.1)

[Compare
Source](https://togithub.com/golang/tools/compare/gopls/v0.10.0...gopls/v0.10.1)

This release contains a fix for
[golang/go#&#8203;56505](https://togithub.com/golang/go/issues/56505): a
new crash during method completion on variables of type `*error`.

Thank you to everyone who filed a crash report.

###
[`v0.10.0`](https://togithub.com/golang/tools/releases/tag/gopls%2Fv0.10.0)

[Compare
Source](https://togithub.com/golang/tools/compare/gopls/v0.9.5...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#&#8203;55267](https://togithub.com/golang/go/issues/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](https://togithub.com/golang/tools/tree/master/gopls#supported-go-versions-and-build-systems),
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#&#8203;52897](https://togithub.com/golang/go/issues/52897)):
this feature has been replaced by `go.work` files. See our
[documentation](https://togithub.com/golang/tools/blob/master/gopls/doc/workspace.md#go-workspaces-go-118)
for information on how to use `go.work` files to work on multiple
modules.
- **experimentalWatchedFileDelay**
([golang/go#&#8203;55268](https://togithub.com/golang/go/issues/55268)):
LSP clients should instead be responsible for buffering
`workspace/didChangeWatchedFiles` notifications.
- **experimentalUseInvalidMetadata**
([golang/go#&#8203;54180](https://togithub.com/golang/go/issues/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`](https://togithub.com/golang/tools/blob/master/gopls/doc/settings.md#standalonetags-string)
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.


![image](https://user-images.githubusercontent.com/57144380/197039428-72d78300-cbea-4abe-a408-e171991094b8.png)

##### (preview) Support for package renaming

This version of gopls contains initial support for renaming packages
([golang/go#&#8203;41567](https://togithub.com/golang/go/issues/41567)).
This is a work in progress and has a surprising number of edge cases.
Additionally, this feature depends heavily on LSP client behavior:
renaming a package involves moving the underlying package directory,
which may behave differently in different editors. Please try it out,
and report your experience at
[golang/go#&#8203;56184](https://togithub.com/golang/go/issues/56184).

To rename a package, initiate a rename request on the package clause of
a file in the package:

![image](https://user-images.githubusercontent.com/57144380/197041786-bf9e617c-9961-46ae-b21a-c240a18a3014.png)

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.

![image](https://user-images.githubusercontent.com/57144380/197042160-e034e38d-3cd3-4c62-b912-747d8dc2f4ff.png)

##### Method information in hover

Hovering over a type now shows a summary of its methods.


![image](https://user-images.githubusercontent.com/57144380/197039012-97172677-3d73-4f23-940a-a64c233003b2.png)

##### Support for Go 1.19 doc comment syntax

This version of gopls supports the new doc comment syntax added in Go
1.19. See https://go.dev/doc/comment for more details.


![image](https://user-images.githubusercontent.com/57144380/197044163-25458881-b735-4676-a83b-81346284749c.png)

##### New diff algorithm

This version of gopls uses an entirely new diff algorithm behind the
scenes, to compute the text edits that gopls sends to the LSP client. We
hope that this fixes a number of bugs in the old diff implementation,
but for the most part you should not notice any effect of this change.
If you do experience problems related to text edits, please report an
issue and set the
[`"newDiff"`](https://togithub.com/golang/tools/blob/master/gopls/doc/settings.md#newdiff-string)
setting to `"old"` to revert to the old diff algorithm.

#### Configuration changes

This release changes the default value of the `"directoryFilters"`
setting from `["-node_modules"]` to `["-**/node_modules"]`, following
support for wildcard syntax.

#### Bug fixes

This version of gopls includes several bug fixes, notably:

- [golang/go#&#8203;43144](https://togithub.com/golang/go/issues/43144):
find references doesn't always search tests
- [golang/go#&#8203;54816](https://togithub.com/golang/go/issues/54816):
extract function action doesn't work if the first line is a comment
- [golang/go#&#8203;55293](https://togithub.com/golang/go/issues/55293):
textDocument/definition is slow in large codebase

A full list of all issues fixed can be found in the
[gopls/v0.10.0](https://togithub.com/golang/go/milestone/278?closed=1)
milestone.
To report a new problem, please file a new issue at
https://go.dev/issues/new.

#### Thank you to our contributors!

[@&#8203;adonovan](https://togithub.com/adonovan),
[@&#8203;brianpursley](https://togithub.com/brianpursley),
[@&#8203;findleyr](https://togithub.com/findleyr),
[@&#8203;hyangah](https://togithub.com/hyangah),
[@&#8203;pjweinbgo](https://togithub.com/pjweinbgo),
[@&#8203;suzmue](https://togithub.com/suzmue), and
[@&#8203;dle8](https://togithub.com/dle8)!

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 3am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click
this checkbox.

Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
@findleyr findleyr self-assigned this Dec 15, 2022
@findleyr
Copy link
Contributor Author

This is done.

As of https://go.dev/cl/457835, gopls no longer builds at Go versions before Go 1.16.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jan 7, 2023
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.
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jan 18, 2023
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.
@golang golang locked and limited conversation to collaborators Dec 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants