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: does not recognize gopkg.in/foo.v2-unstable #23989

Closed
rogpeppe opened this issue Feb 21, 2018 · 7 comments
Closed

cmd/go: does not recognize gopkg.in/foo.v2-unstable #23989

rogpeppe opened this issue Feb 21, 2018 · 7 comments
Labels
FrozenDueToAge modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@rogpeppe
Copy link
Contributor

The ParseGopkgIn function in golang.org/x/vgo/vendor/cmd/go/internal/modfetch/gopkgin.go does not recognize import paths of the form gopkg.in/foo.v2-unstable which are considered valid by gopkg.in.

When using vgo build, it prints errors like:

	import "gopkg.in/macaroon-bakery.v2-unstable/bakery": invalid gopkg.in/ path: "gopkg.in/macaroon-bakery.v2-unstable/bakery"
@rsc
Copy link
Contributor

rsc commented Apr 2, 2018

Blocked on #24099.

@rsc rsc added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Apr 2, 2018
@rsc
Copy link
Contributor

rsc commented Apr 18, 2018

How widely used are -unstable suffixes?
They're not documented on gopkg.in's page. I see them in the source code, and it looks like v2-unstable includes tags like v2.1.3-unstable but not v2.1.3. Given that it's unstable it's not going to play well with semantic import versioning, though.

What's the relationship between work on v2 and v2-unstable? Does all the v2-unstable happen, then the API stabilizes, then it moves to v2? Or does each new change to v2 somehow start on v2-unstable?

@rsc
Copy link
Contributor

rsc commented Apr 18, 2018

/cc @rogpeppe @niemeyer

@rogpeppe
Copy link
Contributor Author

rogpeppe commented May 2, 2018

How widely used are -unstable suffixes?

More widely used than I'd prefer. We're trying to move away from them but we still have large quantities of code that are going to take a long time to do that (some might never succeed).

Given that it's unstable it's not going to play well with semantic import versioning, though.

In that respect, I guess it's like any pre-release version tag (from semver.org: "A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version.").

What's the relationship between work on v2 and v2-unstable? Does all the v2-unstable happen, then the API stabilizes, then it moves to v2?

Yes, that's how it works.

@rsc rsc changed the title x/vgo: does not recognize some valid gopkg.in paths x/vgo: does not recognize gopkg.in/foo.v2-unstable Jul 6, 2018
@rsc rsc modified the milestones: vgo, Go1.11 Jul 12, 2018
@rsc rsc added the modules label Jul 12, 2018
@rsc rsc changed the title x/vgo: does not recognize gopkg.in/foo.v2-unstable cmd/go: does not recognize gopkg.in/foo.v2-unstable Jul 12, 2018
@misha-ridge
Copy link

Note that in current master the error message no longer tells that this syntax of gopkg.in URLs is not allowed:

% go get gopkg.in/alecthomas/kingpin.v3-unstable
go get gopkg.in/alecthomas/kingpin.v3-unstable: cannot find module providing package gopkg.in/alecthomas/kingpin.v3-unstable

@gopherbot
Copy link

Change https://golang.org/cl/128901 mentions this issue: cmd/go: fix handling of gopkg.in/macaroon-bakery.v2-unstable

@rogpeppe
Copy link
Contributor Author

https://golang.org/cl/128901 fixes my issues, thanks. I can now checkout github.com/juju/juju and go mod init; go mod tidy works first time. 175 modules!

@golang golang locked and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

4 participants