-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Change import path to capnproto.org/go/capnp #166
Comments
Sorry, I don't know anything about Go imports. Can you explain what you mean about a On another note, I thought @zombiezen was working on a go-capnproto3 at one point, is that abandoned now? |
This is my fault. I should have described this in terms of desired behavior instead of revealing my poor knowledge of DNS. What I mean is that we would like In other words, we want to do the same thing that Ross did with
Not at all! We're working on it right now. The changes to the import path discussed in my OP would be a part of v3. |
It's not handled in DNS, nor is it an HTTP redirect; the Go tooling will fetch the page and look for a tag in the HTML. from: https://golang.org/cmd/go/#hdr-Remote_import_paths
For example: https://zenhack.net/go/sandstorm/ So, we would need to add such a page to the capnproto website, and also redirect URLs underneath that path back to the top, so imports work for sub-packages as well; for zenhack.net I have this in my ngnix.conf:
|
Oh, right. Sorry for the confusion. |
Sure, this sounds reasonable. Does someone want to prep a PR? The web site is in I think I would take the approach of having the page provide a meta-tag-redirect to github, so if someone opens it in their browser, they get redirected to the github project. Presumably I guess there's no way to create the 301 redirect from inner paths to the root in a PR, so I'll set that up with a Cloudflare page rule or something. |
Opened a pr at capnproto/capnproto#1194 |
Yes! This was my best-case scenario result of #122, in fact. Having a fresh new namespace for the next major version would be good, and indicate a non-zombiezen ownership. Just bear in mind, if you do go through with this being labeled as v3, the full import path must be |
So I guess this would look like:
Do we need to keep everything else around for the v2 code, or is the tooling smart enough to just checkout an appropriately tagged version? |
IIUC, you don't have to do this step. Source: https://golang.org/doc/modules/major-version You should be able to set the import path in go.mod to
Tooling will use the old tagged versions. 👍 |
@zenhack were these changed made and merged? |
@taylorjdawson, yes, the meta tag is set up now, we should just need to make the changes in the repo itself. |
(Actually, I'm not sure whether @kentonv ever set up the redirect on the web server, though the HTML bit is in place). |
Looks like I did:
|
Pinging @zombiezen @kentonv .
As part of #165, it has become necessary to instantiate a go module around this project. @taylorjdawson Initially tried to do the obvious, sensible thing and instantiate it with
go mod init github.com/capnproto/go-capnproto2
, with predictable results (at the risk of explaining the joke, he should have usedzombiezen.com/go/capnproto2
). This detail has briefly confused me on occasion as well, and I worry that it might frustrate new Go developers.Additionally, many editors are configured to add a package alias when the last segment does not match the package name. Ross recently brought this up during code review and I ended up merging it anyway, after trying to figure out how to edit my VSCode configuration for 20 minutes without success. 😞
After discussing this in slack with @zenhack and @taylorjdawson, we're of a mind to to change all the import paths in the project from
zombiezen.com/go/capnproto2
to (ideally)capnproto.org/go/capnp
.@zombiezen Is that okay with you? In addition to asking if this might have technical consequences, I wanted to check that you were okay with this first because it's always a bit delicate when the new guys start rebranding something you built!
@kentonv Assuming ross is onboard with this, would you be willing to add the appropriate
<meta>
tag so that we could import this project ascapnproto.org/go/capnp
?Miscellaneous thought: I think this is probably safe to do since we're working towards a major version bump anyway.
The text was updated successfully, but these errors were encountered: