Closed junkblocker closed 4 years ago
GO111MODULE=on go get -u ...
causes the problem while GO111MODULE=auto
does not.
I'm still seeing this issue
For some reason:
$ cat ~/go/pkg/mod/github.com/junkblocker/codesearch\@v1.2.0/go.mod
module github.com/google/codesearch
go 1.13
$ rm -rf ~/go/pkg/mod/github.com/junkblocker
$ go get -u github.com/junkblocker/codesearch
Puts it back at 1.2.0.
$ GO111MODULE=auto go get github.com/junkblocker/codesearch
go: github.com/junkblocker/codesearch upgrade => v1.2.0
go get: github.com/junkblocker/codesearch@v1.2.0: parsing go.mod:
module declares its path as: github.com/google/codesearch
but was required as: github.com/junkblocker/codesearch
$ GO111MODULE=auto go get github.com/junkblocker/codesearch@v5.0.1
go get github.com/junkblocker/codesearch@v5.0.1: github.com/junkblocker/codesearch@v5.0.1: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v5
Finally worked:
$ go get github.com/junkblocker/codesearch@4574186491dc220c3a124b8b01c7b13403680e6e
Perhaps the release version number v5.0.1
and corresponding lack of v5/
subdirectory throws this off? Not sure.
This may be because go 1.16 has the new default GO111MOODULE=on . I've updated the README and updated the go.mod to include v6 as the version which hopefully helps.
Somehow
google/codesearch/regexp
is being considered v1.2.0 and fetched?Does it depend on GOPROXY being used?