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

cmd/go: preceding tags not always fetched when downloading a pseudo-version #47650

Open
bcmills opened this issue Aug 11, 2021 · 4 comments
Open

cmd/go: preceding tags not always fetched when downloading a pseudo-version #47650

bcmills opened this issue Aug 11, 2021 · 4 comments
Assignees
Labels
modules NeedsInvestigation
Milestone

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented Aug 11, 2021

From a report from @hyangah:

$ go1.17rc2 mod init example.com/m
go: creating new go.mod: module example.com/m

$ export GOPRIVATE=github.com/go-delve/delve

$ go1.17rc2 get -d github.com/go-delve/delve/cmd/dlv@v1.7.1-0.20210804080032-f95340ae1bf9
go: downloading github.com/go-delve/delve v1.7.1-0.20210804080032-f95340ae1bf9
go get: github.com/go-delve/delve/cmd/dlv@v1.7.1-0.20210804080032-f95340ae1bf9: invalid pseudo-version: preceding tag (v1.7.0) not found

$ go1.17rc2 get -d github.com/go-delve/delve/cmd/dlv@f95340ae1bf9
go: downloading github.com/sirupsen/logrus v1.6.0
go: downloading github.com/spf13/cobra v1.1.3
go: downloading github.com/mattn/go-isatty v0.0.3
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/cosiner/argv v0.1.0
go: downloading github.com/mattn/go-colorable v0.0.9
go: downloading github.com/peterh/liner v0.0.0-20170317030525-88609521dc4b
go: downloading github.com/google/go-dap v0.5.0
go: downloading golang.org/x/sys v0.0.0-20210514084401-e8d321eab015
go: downloading go.starlark.net v0.0.0-20200821142938-949cc6f4b097
go: downloading github.com/hashicorp/golang-lru v0.5.4
go: downloading golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4
go: downloading github.com/aquasecurity/libbpfgo v0.1.2-0.20210708203834-4928d36fafac
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.3
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/russross/blackfriday/v2 v2.0.1
go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
go get: added github.com/aquasecurity/libbpfgo v0.1.2-0.20210708203834-4928d36fafac
go get: added github.com/cosiner/argv v0.1.0
go get: added github.com/cpuguy83/go-md2man/v2 v2.0.0
go get: added github.com/go-delve/delve v1.7.1-0.20210804080032-f95340ae1bf9
go get: added github.com/google/go-dap v0.5.0
go get: added github.com/hashicorp/golang-lru v0.5.4
go get: added github.com/inconshreveable/mousetrap v1.0.0
go get: added github.com/konsorten/go-windows-terminal-sequences v1.0.3
go get: added github.com/mattn/go-colorable v0.0.9
go get: added github.com/mattn/go-isatty v0.0.3
go get: added github.com/peterh/liner v0.0.0-20170317030525-88609521dc4b
go get: added github.com/russross/blackfriday/v2 v2.0.1
go get: added github.com/shurcooL/sanitized_anchor_name v1.0.0
go get: added github.com/sirupsen/logrus v1.6.0
go get: added github.com/spf13/cobra v1.1.3
go get: added github.com/spf13/pflag v1.0.5
go get: added go.starlark.net v0.0.0-20200821142938-949cc6f4b097
go get: added golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4
go get: added golang.org/x/sys v0.0.0-20210514084401-e8d321eab015
go get: added gopkg.in/yaml.v2 v2.4.0
@bcmills bcmills added modules NeedsInvestigation labels Aug 11, 2021
@bcmills bcmills added this to the Go1.18 milestone Aug 11, 2021
@bcmills bcmills self-assigned this Aug 11, 2021
@bcmills
Copy link
Member Author

@bcmills bcmills commented Aug 11, 2021

$ git version
git version 2.33.0.rc1.237.g0d66db33f3-goog

(because it isn't clear to me whether this is actually a bug in git or cmd/go.)

@bcmills
Copy link
Member Author

@bcmills bcmills commented Aug 11, 2021

Interestingly, go1.17rc2 mod download -x github.com/go-delve/delve@v1.7.1-0.20210804080032-f95340ae1bf9 doesn't reproduce the error. So I suspect that this has something to do with looking for nested modules before the root module. (Perhaps we're fetching the nested-module tags but caching them as though we had downloaded the root-module tags?)

@aarzilli
Copy link
Contributor

@aarzilli aarzilli commented Dec 3, 2021

FWIW I'm running into something very similar to this with golang.org/x/tools:

$ go get -u golang.org/x/tools@master
go get: upgraded golang.org/x/mod v0.4.2 => v0.5.1
go get: upgraded golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e => v0.0.0-20211019181941-9d821ace8654
go get: upgraded golang.org/x/tools v0.1.7 => v0.1.8-0.20211202032535-e212aff8fd14
$ go build
../../n/go/pkg/mod/golang.org/x/tools@v0.1.8-0.20211202032535-e212aff8fd14/internal/gocommand/vendor.go:17:2: missing go.sum entry for module providing package golang.org/x/mod/semver (imported by golang.org/x/tools/internal/gocommand); to add:
	go get golang.org/x/tools/internal/gocommand@v0.1.8-0.20211202032535-e212aff8fd14
../../n/go/pkg/mod/golang.org/x/tools@v0.1.8-0.20211202032535-e212aff8fd14/go/packages/external.go:15:2: missing go.sum entry for module providing package golang.org/x/sys/execabs (imported by golang.org/x/tools/go/packages); to add:
	go get golang.org/x/tools/go/packages@v0.1.8-0.20211202032535-e212aff8fd14
$ go get golang.org/x/tools/internal/gocommand@v0.1.8-0.20211202032535-e212aff8fd14
go get: golang.org/x/tools/internal/gocommand@v0.1.8-0.20211202032535-e212aff8fd14: invalid pseudo-version: preceding tag (v0.1.7) not found

This is with GOPROXY=direct, happens on go1.17 and go1.18. Git version 2.25.1.

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Jan 28, 2022

@bcmills This is in the 1.18 milestone; time to move to 1.19? Thanks.

@bcmills bcmills removed this from the Go1.18 milestone Feb 1, 2022
@bcmills bcmills added this to the Go1.19 milestone Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modules NeedsInvestigation
Projects
None yet
Development

No branches or pull requests

3 participants