-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Description
What version of Go are you using (go version)?
$ go version go version devel +623d653db7 Sat Jun 29 13:17:15 2019 +0000 linux/amd64
Does this issue reproduce with the latest release?
No, because Go 1.12 doesn't have a GOPROXY set up by default.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env GO111MODULE="on" GOARCH="amd64" GOBIN="/home/mvdan/go/bin" GOCACHE="/home/mvdan/go/cache" GOENV="/home/mvdan/.config/go/env" GOEXE="" GOFLAGS="-ldflags=-w" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/mvdan/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org" GOROOT="/home/mvdan/tip" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/mvdan/tip/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/dev/null" 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-build558320792=/tmp/go-build -gno-record-gcc-switches" GOROOT/bin/go version: go version devel +623d653db7 Sat Jun 29 13:17:15 2019 +0000 linux/amd64 GOROOT/bin/go tool compile -V: compile version devel +623d653db7 Sat Jun 29 13:17:15 2019 +0000 uname -sr: Linux 5.1.15-arch1-1-ARCH /usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.29. gdb --version: GNU gdb (GDB) 8.3
What did you do?
Module A and B live in separate repositories, and they are both v0. A depends on B.
I push a commit to B, and then run go get -u in A to update the dependency to that new master commit. Alternatively, tried go get B@master.
What did you expect to see?
A's go.mod updated to show B's latest pseudo-version with the master commit just pushed.
What did you see instead?
B's version staying at an older version, pushed hours or days before. Presumably because proxy.golang.org caches the version for @latest and @master.
This went unnoticed for a while and someone was scratching their head until they realised go get -u hadn't done what they were used to.
GOPROXY=direct go get -u had to be used to work around this issue in the end. The other option was to manually copy the commit hash to force the proxy to fetch that git ref, which is a bit cumbersome.
In the end, I worry that the new GOPROXY default in 1.13 is going to confuse people who are used to pushing to multiple repos that depend on each other. I understand why the proxy server can't fetch from git repeatedly every single time, but I wonder if there's something we can do to not silently break this.
/cc @bcmills @heschik @jayconrod