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: no go-import meta tags error could be more informative #16467

Closed
trist4n opened this issue Jul 22, 2016 · 1 comment
Closed

cmd/go: no go-import meta tags error could be more informative #16467

trist4n opened this issue Jul 22, 2016 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@trist4n
Copy link

trist4n commented Jul 22, 2016

Using go 1.6.3 on amd64, I was encountering an error stemming from go-import tags containing a hostname that did not match the import path.

While this stemmed from a misconfiguration of a gitlab instance, it took a bit of time to spot the discrepancy, as the errors coming from go get were generic and gave the (me) impression that no tags were present, as opposed to a mismatch.

This can be reproduced with gitlab (and probably other tools) by attempting to go get the package by using a hostname other than the currently configured external_url.

The current behaviour is to emit a warning like:
package git1.host.com/user/package: unrecognized import path "git1.host.com/user/package" (parse https://git1.host.com/user/package?go-get=1: no go-import meta tags)

I think it would be helpful if the error message gave more context about why no meta tags were matched.
A small patch i've prepared would change the output to:
package git1.host.com/user/package: unrecognized import path "git1.host.com/user/package" (parse https://git1.host.com/user/package?go-get=1: no go-import meta tags (prefix [git.host.com user package] did not match import [git1.host.com user package]))

where the erroneous host from gitlab is git.host.com, failing to match git1.host.com.

@gopherbot
Copy link

CL https://golang.org/cl/25121 mentions this issue.

@mikioh mikioh changed the title no go-import meta tags error could be more informative cmd/go: no go-import meta tags error could be more informative Jul 22, 2016
@quentinmit quentinmit added this to the Go1.8 milestone Jul 29, 2016
@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 6, 2016
@golang golang locked and limited conversation to collaborators Oct 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants