-
Notifications
You must be signed in to change notification settings - Fork 147
Go 1.7rc1 - can't find import: "golang.org/x/net/http2/hpack" #635
Comments
@unrolled This is not related to GB but to Go 1.7rc1 See : golang/go#16333 |
@davecheney As mentioned on golang/go#16333 (comment) The new fix for Go 1.7 will in fact trigger a "bug" in GB with "_" not being allowed in the following regex : Line 72 in 4ffaea6
|
I get this same issue trying to vendor most new libraries. Steps to reproduce:
Here's the state of the manifest and the tree after that's complete: https://gist.github.com/kevinburke/6fbddb351bdfbd902e904bfb4084ebd1 Note also if you try to run it again,
|
I just tried downloading/compiling gb with Go 1.6.3, then rerunning |
FWIW, here's a patch to make version reporting easier: #639 |
Thank you for reporting this issue. The problem is caused by golang/go@4d00937 which renamed $GOROOT/src/vendor/golang.org to golang_org to fix golang/go#16333 The solution is not to change the regex, but to add enough support for vendor/ to gb to be able to pick up the vendored copy of the net/http2 packages from $GOROOT. |
wrt.
This is technically correct, vektra/mockery has been written to the manifest file, but it's cold comfort because you'll need to vendor each extra dependency by hand (or remove vektra/mockery) and fetch it again. |
Fixes #635 golang/go#16333 renamed $GOROOT/src/vendor/golang.org to $GOROOT/src/vendor/golang_org. This solved a nasty problem where code in GOROOT would shadow any other copy of the net/http2 library, but meant that gb vendor could no longer resolve the package and try to fetch it (even if that was pointless). To solve this, include $GOROOT/src/vendor in the set of search paths so that golang_org/net/http/... is always found (if present). I'll add a test for this in the integration test repo.
#640) * cmd/gb-vendor: search $GOROOT/src/vendor when resolving recursive deps Fixes #635 golang/go#16333 renamed $GOROOT/src/vendor/golang.org to $GOROOT/src/vendor/golang_org. This solved a nasty problem where code in GOROOT would shadow any other copy of the net/http2 library, but meant that gb vendor could no longer resolve the package and try to fetch it (even if that was pointless). To solve this, include $GOROOT/src/vendor in the set of search paths so that golang_org/net/http/... is always found (if present). I'll add a test for this in the integration test repo. * internal/vendor: handle missing depset roots $GOROOT/src/vendor does not exist in Go < 1.6
Is there a good way to fix this? I'm still seeing this with go 1.7 and gb from head... |
It should be fixed in tip. If you've upgraded go make sure you rebuild gb.
|
Thanks for the quick reply. I did a |
Yeah, I'm still seeing this and I believe I'm correctly installed. Is there a way to get (do I need to re-vendor the dependency?) |
nope, gb doesn't have a version command, sorry, it's a long story. On Mon, Sep 26, 2016 at 2:03 PM, Brendan Burns [email protected]
|
The sad story of a version number is #595 The easiest solution would be to remove |
ah, I re-built gb but not gb-vendor, perhaps the problem... |
(might I suggest at least a --verbose flag that logs the current git commit, precisely for use-cases like this, even if you are far from 1.0) |
I hope that is the problem. It's taking me a while to page back in the On Mon, 26 Sep 2016, 14:28 Brendan Burns [email protected] wrote:
|
The problem is, how to do that inside the framework of the go tool. I don't want to go down the route, just yet, of adding makefilea or othrt On Mon, 26 Sep 2016, 14:29 Brendan Burns [email protected] wrote:
|
sorry to drag you back into the bug, but I can't seem to get this to work, here's a repro:
If that works for you, then clearly my dev environment is borked somehow... |
@brendandburns that worked fine for me at tip. Which version of Go are you using? On the off chance that you are using 1.7rc1 you'll have to move off that version as that broke not just gb, but go packages using external repos |
Right, I'm facing similar issue but with golang.org/x/net/http2.
and I'm on:
and second quote: Sorry but this is a bit confused and gets me a little worried about the actual state of go package management. :| Sometimes, people like me comes to opened issues, asking about something else that is not exactly what the defect is about, but is related and I appologise for this, however because the problem seems very similar, I understand that the question is pertinent to the topic, so I hope you guys don't mind it. When I try to go get the golang.org/x/net/http2, I'm running into:
Sorry but this error is really unclear, any ideas ? This is my
I feel like there is something broken and people are not being told about it, perhaps we should advise people about this a bit better ? Thanks and sorry to disturb. |
Is this related to gb, or the go tool. If it's gb can you please open a new issue with the output of running the relevant command with
My comment related to the way the
You need to move off 1.7rc1, it is not production quality.
Yes, it's a mess.
Hopefully I've answer your question. If it's related to the go tool, i'm sorry I cannot help you here. If it's related to gb, I recommend opening a new issue. When I try to go get the golang.org/x/net/http2, I'm running into:
This looks like the go tool, something has moved your copy of
You shouldn't have to do this. This problem looks like a problem with the go tool, not gb, please raise an issue on https://github.com/golang/go. |
I'm going to close this issue for the moment. I'm pretty sure the workaround in place should work. PLEASE if anyone else has this problem, please raise a new issue so we have a clean chain of debugging information. I'm going to lock this issue to ensure this happens. Thank you for your understanding. |
I've added
https://github.com/sideshow/apns2
as a vendor to my project, which in turn requiresgolang.org/x/net/http2
. Everything builds properly in Go 1.6.2. I installed Go 1.7rc1 (viabrew install go --devel
), and now I receive this errorframe.go:17: can't find import: "golang.org/x/net/http2/hpack"
. I've tried updating my vendors andgb
, but nothing seems to help.$ env DEBUG=. gb build
$ gb env
$ go env
The text was updated successfully, but these errors were encountered: