You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: