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

Can't update to 2.17.1+ with go modules #150

Closed
rkuska opened this issue Sep 18, 2019 · 2 comments
Closed

Can't update to 2.17.1+ with go modules #150

rkuska opened this issue Sep 18, 2019 · 2 comments
Labels

Comments

@rkuska
Copy link

rkuska commented Sep 18, 2019

I am not able to install anything later than 2.17.0 release with go modules. Running go get -u -t zombiezen.com/go/capnproto2/... results in installing v2.17.0 which is a bit ironic as 2.17.1 introduced a support for go modules to this project :-). I believe that go.mod is missing version tag in its name. Instead of module zombiezen.com/go/capnproto2 should have module zombiezen.com/go/capnproto2/v2.

Manually editing my project's go.mod:

-       zombiezen.com/go/capnproto2 v2.17.0
+       zombiezen.com/go/capnproto2 v2.17.4

Results in (when running go mod tidy):
require zombiezen.com/go/capnproto2: version "v2.17.4" invalid: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2

Editing to:

-       zombiezen.com/go/capnproto2 v2.17.0
+       zombiezen.com/go/capnproto2/v2 v2.17.4

Results in (when running go mod tidy):
go: zombiezen.com/go/capnproto2/[email protected]: unrecognized import path "zombiezen.com/go/capnproto2/v2" (parse https://zombiezen.com/go/capnproto2/v2?go-get=1: no go-import meta tags ())

@zombiezen zombiezen added the bug label Sep 22, 2019
@zombiezen
Copy link
Contributor

Hey Robert. Sorry about this.. the basic problem is that this package has been around and using semantic import versioning before that became codified in the Go toolchain. Unfortunately, this means that the import path doesn't correctly have a v2 suffix. My plan is to publish a version of zombiezen.com/go/capnproto2 that forwards all the declarations to zombiezen.com/go/capnproto/v2 and make that the canonical import path.

However, I haven't had time to prioritize this over other work I'm doing, since it'll be fairly involved to do it in a way that minimizes breakage. I suppose I could fix the situation by removing the go.mod file, but I haven't thought through the implications yet.

@rkuska
Copy link
Author

rkuska commented Sep 23, 2019

That's perfectly understandable, thank you for the reply! I will use pseudo-versions (e.g. zombiezen.com/go/capnproto2 v0.0.0-20190813022230-ddfb9bb855fa for ddfb9bb)
for updating capnproto in the meanwhile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants