Open
Description
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...
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
seankhliao commentedon Mar 25, 2020
The code is in gitgub.com/RainwayApp/MetaPod/src/metapod
bcmills commentedon Mar 25, 2020
bcmills commentedon Mar 25, 2020
Note that commit
337878358c65
of that repository indeed does not contain any Go source files at the module root.[-]Go module downloaded with no go files[/-][+]proxy.golang.org: github.com/RainwayApp/metapod@modulize cached to an older-than-expected commit[/+]bcmills commentedon Mar 25, 2020
github.com/RainwayApp/metapod@modulize
probably resolved to an older-than-expected commit due to caching inproxy.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.)
emily33901 commentedon 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
vs6a6
...)?emily33901 commentedon 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 folder13 remaining items