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: version from master needs metadata #37698

Closed
DavidGamba opened this issue Mar 5, 2020 · 5 comments
Closed

x/tools/gopls: version from master needs metadata #37698

DavidGamba opened this issue Mar 5, 2020 · 5 comments
Labels
Milestone

Comments

@DavidGamba
Copy link

@DavidGamba DavidGamba commented Mar 5, 2020

What version of Go are you using (go version)?

$ go version
go version go1.14 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/david/.cache/go-build"
GOENV="/home/david/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/david/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/david/opt/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/david/opt/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build109890223=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ go get golang.org/x/tools/gopls
$ gopls version
version master, built in $GOPATH mode

What did you expect to see?

Version information that includes metadata from the commit the version was pulled from.

$ gopls version
golang.org/x/tools/gopls v0.0.0+6a641547

What did you see instead?

No useful version information to point back to a specific commit.

@gopherbot gopherbot added this to the Unreleased milestone Mar 5, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Mar 5, 2020

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Mar 5, 2020

Building gopls in GOPATH mode is not supported. Please download gopls by running GO111MODULE=on go get golang.org/x/tools/gopls@master and you should get the results that you expect.

@stamblerre stamblerre closed this Mar 5, 2020
@DavidGamba
Copy link
Author

@DavidGamba DavidGamba commented Mar 6, 2020

Thanks for the response @stamblerre. Still no metadata:

$ GO111MODULE=on go get golang.org/x/tools/gopls@master
go: downloading golang.org/x/tools v0.0.0-20200306161513-8287d625a0c7
go: downloading golang.org/x/tools/gopls v0.1.8-0.20200306161513-8287d625a0c7
go: golang.org/x/tools/gopls master => v0.1.8-0.20200306161513-8287d625a0c7
go: downloading golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d
go: downloading golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7
# golang.org/x/tools/gopls/internal/hooks
/home/david/go/pkg/mod/golang.org/x/tools/gopls@v0.1.8-0.20200306161513-8287d625a0c7/internal/hooks/hooks.go:19:9: options.URLRegexp undefined (type *source.Options has no field or method URLRegexp)
$ gopls version
golang.org/x/tools/gopls master
    golang.org/x/tools/gopls@(devel)
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Mar 6, 2020

Ah, I'm sorry I made a mistake in the original command. It should be:

GO111MODULE=on go get golang.org/x/tools/gopls@master golang.org/x/tools@master
@DavidGamba
Copy link
Author

@DavidGamba DavidGamba commented Mar 6, 2020

Thanks so much, that did it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.