-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: unclear error when server does not provide 'go-import' metadata for a module in a subdirectory #35013
Comments
Thanks for the clear steps to reproduce the problem. The root cause seems to be that your HTTPS server is not serving a
That causes the Or, perhaps we can improve the documentation for the remote import path protocol. What documentation were you using when setting up the server? |
But github does not provide that either
and over there it works just fine. As far as I can tell only difference is the
Actually, when I try to import it as
I do not know, it's a hosted service not setup by me. /cc @ddevault |
See this issue: The fix has landed for the next Go release. |
Err, no, that was cgo-specific. This may be a git.sr.ht bug. |
GitHub is (unfortunately) a hard-coded special case at the moment, so that's probably why it works there. (But that means that GitHub is not a good example to follow when constructing your own See also #26134. go/src/cmd/go/internal/get/vcs.go Lines 1026 to 1033 in 0e3e46f
|
It's really shame that biggest open source hosting is special cased so it cannot be used for comparing with other implementations. Are there any plans to de-hard-code them? |
It's also a shame that Golang has to be special cased for every repository hosting platform. I'd really rather have a more general solution than adding Go-specific meta tags to each repo. |
@ddevault, per https://golang.org/cmd/go/#hdr-Remote_import_paths, you can always use a |
@graywolf we have no plan to remove the hard-coded paths at this time. Presumably as a first step we would have to get upstream fixes for them to implement the full |
Not about the error message or go get mechanisms, but sr.ht fixed its implementation of remote import protocol on Dec 19. |
"Fixed". I still think it's really silly that a git repo has to have language-specific meta tags. There really ought to be a more universal standard. |
@ddevault complains he got blocked on this repo. Is it some kind of ban done by a bot? |
It's quite strange to me that Go has given specific exceptions to the At the very least this behavior should be documented - at the moment the docs seem to say that GitHub's
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Created go module:
pushed it to the repository (
https://git.sr.ht/~graywolf/foo
) and tried to use it in following program:What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: