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

proxy.golang.org: update to Go 1.13.3 to pick up the fix for #34477 #34991

Closed
zikaeroh opened this issue Oct 18, 2019 · 7 comments
Closed

proxy.golang.org: update to Go 1.13.3 to pick up the fix for #34477 #34991

zikaeroh opened this issue Oct 18, 2019 · 7 comments
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@zikaeroh
Copy link
Contributor

zikaeroh commented Oct 18, 2019

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

$ go version
go version go1.13.3 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/jake/.cache/go-build"
GOENV="/home/jake/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/jake/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/jake/sdk/go1.13.3"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/jake/sdk/go1.13.3/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/jake/testproj/gopls-mod-bug/go.mod"
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-build837848104=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ go mod init goplstest
$ go get golang.org/x/tools/gopls@master golang.org/x/tools@master

Repeat with and without GOPROXY=direct, and check go.mod.

What did you expect to see?

The same output with/without a proxy.

What did you see instead?

With the default:

module goplstest

go 1.13

require (
	golang.org/x/tools v0.0.0-20191018000036-341939e08647 // indirect
	golang.org/x/tools/gopls v0.0.0-20191018000036-341939e08647 // indirect
)

With GOPROXY=direct:

module goplstest

go 1.13

require (
	golang.org/x/tools v0.0.0-20191018000036-341939e08647 // indirect
	golang.org/x/tools/gopls v0.1.8-0.20191018000036-341939e08647 // indirect
)

Note the version differences in the last requirement line. I wrote a go/bin manager that manages tools via mod files as dotfiles, and this hits me when I sometimes set GOPROXY=direct and the versions I have change (even though there was no update).

@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Oct 18, 2019
@zikaeroh
Copy link
Contributor Author

zikaeroh commented Oct 18, 2019

I think the gopherbot gopls title matcher needs a little work... 🙂

@golang golang deleted a comment from gopherbot Oct 18, 2019
@heschi
Copy link
Contributor

heschi commented Oct 18, 2019

The go command uses the Git history to decide what version the pseudoversion should be based on, and it seems like doing tools/ and tools/gopls at the same time changes that result somehow. I don't know if this is a bug in the go command or maybe in Gerrit's unshallow implementation?

$ GOPATH=$(mktemp -d) GOPROXY=direct go get golang.org/x/tools/gopls@master
...
go: downloading golang.org/x/tools/gopls v0.0.0-20191018000036-341939e08647
$ GOPATH=$(mktemp -d) GOPROXY=direct go get golang.org/x/tools/gopls@master golang.org/x/tools@master
...
go: downloading golang.org/x/tools/gopls v0.1.8-0.20191018000036-341939e08647

proxy.golang.org downloads one thing at a time, so gets the former behavior.

@bcmills @jayconrod

@heschi heschi added GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed gopls Issues related to the Go language server, gopls. labels Oct 18, 2019
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Oct 18, 2019
@heschi heschi removed the gopls Issues related to the Go language server, gopls. label Oct 18, 2019
@heschi heschi changed the title cmd/go: gopls version differs at same revision between GOPROXY=direct and proxy.golang.org cmd/go: computed pseudoversion for x/tools/gopls is different if x/tools is fetched at the same time Oct 18, 2019
@bcmills
Copy link
Contributor

bcmills commented Oct 18, 2019

There is a bug in the git client itself, for which a workaround was backported in #34477.

Probably proxy.golang.org just needs to be upgraded to Go 1.13.3 to pick up the fix.
(@heschik, what go version were you using in #34991 (comment)?)

@bcmills bcmills added this to the Go1.14 milestone Oct 18, 2019
@zikaeroh
Copy link
Contributor Author

zikaeroh commented Oct 18, 2019

Yeah, I hadn't tested this specifically without also getting x/tools itself, as gopls's master often fails to compile without its parent module also being at master (regardless of what its go.mod says is the minimum), and my goal is to get a working binary. Thanks for noticing that point, @heschik.

@bcmills
Copy link
Contributor

bcmills commented Oct 18, 2019

Provisionally retitling to reflect the current working theory, but please do let me know if we find evidence that this is still an issue after 1.13.3.

@bcmills bcmills changed the title cmd/go: computed pseudoversion for x/tools/gopls is different if x/tools is fetched at the same time proxy.golang.org: update to Go 1.13.3 to pick up the fix for #34477 Oct 18, 2019
@heschi
Copy link
Contributor

heschi commented Oct 18, 2019

I was on 1.13. 1.13.3 does fix it.

We're actually working on upgrading proxy.golang.org now, coincidentally.

@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go labels Oct 18, 2019
@bcmills bcmills modified the milestones: Go1.14, Unreleased Oct 18, 2019
@heschi
Copy link
Contributor

heschi commented Oct 23, 2019

proxy.golang.org is updated to 1.13.3, and https://proxy.golang.org/golang.org/x/tools/gopls/@v/master.info shows v0.1.8-0.20191023202404-2b779830f9d3.

@heschi heschi closed this as completed Oct 23, 2019
@golang golang locked and limited conversation to collaborators Oct 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants