Skip to content

Commit

Permalink
gopls: update to 0.8.0.
Browse files Browse the repository at this point in the history
Go version support

Support for Go 1.18

Version 0.8.0 of gopls supports features added to Go 1.18,
specifically:

    Support for multi-module workspaces using go.work files.
    Diagnostics for Fuzz tests.  Improved support for generics.

To use these features, gopls must be installed using Go 1.18. See
go.dev/dl for the latest status of Go 1.18 -- as of writing Go 1.18
is not yet released, but Go 1.18 RC1 may be used.

Dropped support for Go 1.12

Version 0.8.0 of gopls no longer supports building at Go 1.12. See
golang/go#50827 for more details.

New Features

go.work integration

Gopls now supports multi-module workspaces using go.work files. To
use this feature, create a go.work file that includes the modules
you want to work on, and then open your editor to the directory
containing go.work. For more information, see the go.work reference,
or the gopls documentation for multi-module workspaces.

Diagnostics for Fuzz tests

When writing Fuzz tests, gopls provides diagnostics for invalid
arguments to Fuzz.

Improved support for generics

Honor the language version configured in go.mod

gopls now provides diagnostics for language features based on the
go directive in the applicable go.mod file for a package.

For some errors related to incompatible language versions, gopls
offers a quick-fix to update the go.mod Go version. (note that if
the go.mod file is open, it may need to be saved in order for
language version changes to take effect)

gomodedit

Improved completion with type parameters

Gopls autocompletion is improved in several contexts when using
generic types.

genericvarcompl

New code action to add missing method stubs

Gopls now provides a code action to implement missing methods.

Improved performance and accuracy for workspace symbol requests

Workspace symbols uses a new fuzzy matcher that is up to 3x faster
than previous, and has improved ranking. See golang/go#50016 for
more details. Note that the first time workspace symbols are
requested, there may be a delay as the symbol cache is populated.

Improved gofumpt integration

Gopls now sets the language version and module path when invoking
gofumpt, allowing more accurate formatting based on context.
  • Loading branch information
wiz committed Mar 8, 2022
1 parent a571e45 commit 7d88fb4
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 88 deletions.
5 changes: 2 additions & 3 deletions devel/gopls/Makefile
@@ -1,10 +1,9 @@
# $NetBSD: Makefile,v 1.45 2022/03/07 09:14:05 bsiegert Exp $
# $NetBSD: Makefile,v 1.46 2022/03/08 08:33:03 wiz Exp $
#
# Release notes:
# https://github.com/golang/tools/releases

DISTNAME= gopls-0.7.5
PKGREVISION= 2
DISTNAME= gopls-0.8.0
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=golang/}
GITHUB_PROJECT= tools
Expand Down

0 comments on commit 7d88fb4

Please sign in to comment.