Skip to content

proxy.golang.org: long cache TTL causes confusing UX for 'go get <module>@<branchname>' #38065

Open
@emily33901

Description

@emily33901

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?

Yes

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 GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=E:\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=E:\src\rainway-metapod\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-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 github.com/RainwayApp/metapod@modulize and then attempt to import and use metapod in a program

package main

import "github.com/RainwayApp/metapod"

func main() {
	metapod.Create()
}

What did you expect to see?

No errors! woo!

What did you see instead?

module github.com/RainwayApp/metapod@latest found (v0.0.0-20190515153323-337878358c65), but does not contain package github.com/RainwayApp/metapod

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...

Activity

seankhliao

seankhliao commented on Mar 25, 2020

@seankhliao
Member

The code is in gitgub.com/RainwayApp/MetaPod/src/metapod

bcmills

bcmills commented on Mar 25, 2020

@bcmills
bcmills

bcmills commented on Mar 25, 2020

@bcmills
Contributor

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

changed the title [-]Go module downloaded with no go files[/-] [+]proxy.golang.org: github.com/RainwayApp/metapod@modulize cached to an older-than-expected commit[/+] on Mar 25, 2020
bcmills

bcmills commented on Mar 25, 2020

@bcmills
Contributor

github.com/RainwayApp/metapod@modulize probably resolved to an older-than-expected commit due to caching in proxy.golang.org. 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.)

added
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
on Mar 25, 2020
added this to the Unplanned milestone on Mar 25, 2020
emily33901

emily33901 commented on Mar 25, 2020

@emily33901
Author

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...)?

emily33901

emily33901 commented on Mar 25, 2020

@emily33901
Author

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

13 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.modulesproxy.golang.org

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @icholy@emily33901@bcmills@gopherbot@seankhliao

        Issue actions

          proxy.golang.org: long cache TTL causes confusing UX for 'go get <module>@<branchname>' · Issue #38065 · golang/go