-
Notifications
You must be signed in to change notification settings - Fork 37
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
go4.org repo collides with go4.org/grpc #30
Comments
Ah I understand, thanks. |
@bradfitz wouldn't it be enough to change
into
in the meta HTML returned by https://go4.org/grpc ? I've never played with meta yet, so I'm going to test and see on a dummy repo. Edit: ah nevermind, I see now that this would pull the contents of https://github.com/go4org/grpc directly into GOPATH/src/go4.org , which is def not what we want. |
ok, I think this would work:
to:
WDYT? |
I'd rather not move everything down a directory in my fork, as I'm trying to keep the git history and file layout roughly compatible (and comparable) with the official grpc-go upstream git repo. That's why I didn't just copy everything into go4's git repo, for instance. If I'd known about this problem before, I wouldn't have gone this route and I might've used a subdomain of go4.org instead. Maybe I still should, even if Still thinking. Ideas welcome. |
Have you considered an You'd want https://grpc.go4.org?go-get=1 to serve: <meta name="go-import" content="grpc.go4.org git https://github.com/go4org/grpc"> |
Interesting thought. Are there examples of anybody else doing this? The closest I can think of is "golang.org/x/oauth2" which is only interesting in that its package files are in the root of its git repo and not under a subdirectory. But yeah, I can't think of why that wouldn't work. |
What exactly are you referring to by "this"? Using the root of a domain as a custom import path of a Go package, or something else? One example I can think off the top of my head is: (I'm aware of it from golang/go#13506 and golang/gddo#355.)
That's pretty common, most projects that have custom import paths are at the root of the git repo, e.g.:
|
Yes, "this" == "root of a domain as a custom import path". Super excited to hear that works. I'll set that up now. Thanks! |
Follow-up to 9f3812d. Turns out the cmd/go tool doesn't like having go4.org/* in one git repo and go4.org/grpc in a different repo. Updates go4org/go4#30
Fixes go4org/go4#30 Change-Id: Id914ac18bb5bed723a14147d239496aa165e1f3a Reviewed-on: https://go-review.googlesource.com/45272 Reviewed-by: Brad Fitzpatrick <[email protected]>
Done. Let me know if there are problems or parts I forgot. Thanks! |
It's one of the things I really appreciate about Go (and contribute fixes when needed): it's simple and has few unexpected edge cases. Vanity import paths are just schema-less URLs, and a URL with the path value "/" (i.e., domain root) is no more special than "/foo/bar", so it's nice that it works equally well as an import path. 😊 |
The situation with nested/overlapping repositories is interesting. @adg, did you file that cmd/go issue? What number is it? I'd like to follow it. |
He didn't. Feel free to file one yourself? |
If you do this
then the second command fails.
This is because
go get
doesn't support nested repositories, and it's not clear that this can or should work (there should be a corresponding issue for cmd/go; will file it). The workaround is to perform the commands in the opposite order.The text was updated successfully, but these errors were encountered: