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 long cache TTL causes confusing UX for 'go get <module>@<branchname>' #38065

emily33901 opened this issue Mar 25, 2020 · 7 comments


Copy link

@emily33901 emily33901 commented Mar 25, 2020

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

$ go version
go version go1.14.1 windows/amd64

Does this issue reproduce with the latest release?


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

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\josh\AppData\Local\go-build
set GOENV=C:\Users\josh\AppData\Roaming\go\env
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=E:\go
set GOPROXY=,direct
set GOROOT=c:\go
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set GOMOD=E:\src\rainway-metapod\go.mod
set CGO_CFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\josh\AppData\Local\Temp\go-build763362010=/
tmp/go-build -gno-record-gcc-switches

What did you do?

go get and then attempt to import and use metapod in a program

package main

import ""

func main() {

What did you expect to see?

No errors! woo!

What did you see instead?

module found (v0.0.0-20190515153323-337878358c65), but does not contain package

Whats interesting is that the downloaded module is devoid of go files which I dont really get (this is even after trying to go get the module again after deleting it from here).

I got around this by creating a new branch (modulize2) which has all the files - however im not sure how its possible for it to end up in this state in the first place so just thought id bring it up...

Copy link

@seankhliao seankhliao commented Mar 25, 2020

The code is in


This comment has been hidden.

@bcmills bcmills marked this as a duplicate of #31866 Mar 25, 2020
@bcmills bcmills closed this Mar 25, 2020
@bcmills bcmills marked this as not a duplicate of #31866 Mar 25, 2020
Copy link

@bcmills bcmills commented Mar 25, 2020

Note that commit 337878358c65 of that repository indeed does not contain any Go source files at the module root.

@bcmills bcmills reopened this Mar 25, 2020
@bcmills bcmills changed the title Go module downloaded with no go files cached to an older-than-expected commit Mar 25, 2020
Copy link

@bcmills bcmills commented Mar 25, 2020 probably resolved to an older-than-expected commit due to caching in This is a known and intentional behavior of the proxy, but it can certainly be confusing.

(I'm trying to find the right issue to mark this as a duplicate.)

Copy link

@emily33901 emily33901 commented Mar 25, 2020

I sort of expected that to be the case - just didnt know where in the chain that happened. Is there any reason why the commit hash in the error message is different to the one in the module cache path (337878358c65 vs 6a6...)?

Copy link

@emily33901 emily33901 commented Mar 25, 2020

Yeah and the error message that i copied in i think is wrong it should be for @modulize not @latest becuase latest definitely doesnt have any at the root folder

@bcmills bcmills changed the title cached to an older-than-expected commit long cache TTL causes confusing UX for 'go get <module>@<branchname>' Nov 13, 2020
Copy link

@icholy icholy commented Mar 22, 2021

Perhaps could have a "check for newer version" button. The TTL could be communicated by greying that button out with a "try again in X minutes" message.

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

Successfully merging a pull request may close this issue.

None yet
4 participants