-
Notifications
You must be signed in to change notification settings - Fork 43
use vendoring instead of gx for quic-go #42
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we vendor only quic-go
? Or is there a reason to also vendor:
golang.org/x/crypto
github.com/lucas-clemente/aes12
github.com/hashicorp/golang-lru
github.com/bifurcation/mint
These are all dependencies of quic-go. I vendored quic-go (which itself vendors its dependencies) by running govendor fetch github.com/lucas-clemente/quic-go@=v0.10.0-no-integrationtests Apparently, this stripped all the dependencies from the Do you know any better way to vendor stuff? |
Ah, I see that Regarding the |
Why do you think it’s a mistake? golang/x comes with no stability guarantee whatsoever (we once had to deal with the case that they renamed one of the packages without prior notice). |
An alternative is to:
I'd also seriously consider forking quic-go for now. Note: what I don't want is two copies of the golang/x packages in in go-ipfs. |
I don't really like the idea of a fork. It would work, but seems like it's just a workaround for Go imports not being able to include anything other than the While I disagree that it's a mistake to vendor golang/x in quic-go itself, I understand that we don't want to have two copies in go-ipfs. |
This package already uses a gxed version of quic-go. My suggestion was to:
That way, the gx package will use the gxed quic-go but the regular package will use the vendored deps. |
Of course, and it's the only way QUIC can be used. My worries with your suggestion is that we have two different ways to use QUIC, which makes it easier for errors to creep in. If we do so, we should definitely have Travis run the tests with and without gx. |
This is always true with |
01bb78d
to
63af42a
Compare
ping @karalabe, I can't sign into twitter right now, but I think this is the root of the thing you were talking about. |
@whyrusleeping I'm not really sure to be honest, though maybe someone here can point me to a good direction? I'm trying to maintain a version of IPFS that plays nicely with stock Go tooling (i.e.
Notably, I see 2 horrible things in this log:
|
I figured out half my problem. 8 months ago the IPFS repo added The failures however only started to happen recently, since until then IPFS didn't refer to broken code (with non-broken versions). Now I need to figure out how to pin QUIC to a meaningfully workable version. |
And I've solved my last issue too. Apparently the upstream Btw, for any oursider, I was talking about this project: https://github.com/ipsn/go-ipfs |
@marten-seemann not intending to put a stick in the wheel of vendoring, but have you guys considered Of course, all this is unfeasible if you need to support Go versions < 1.11, but would IMHO be a step in the right direction, and would help us experiment with |
@raulk: That would be a valid reason to drop Go < 1.11. I haven't played around with go mod yet. What advantage do you see over using go vendoring, other than this is where Go is apparently headed? |
@raulk: I'd like to resolve this issue soon (as soon as I find someone who can enable CircleCI for this repo, Travis is annoying...). It seems that you've already spent some time digging into go mod, so I'd appreciate your help here. |
63af42a
to
17aa0b4
Compare
e545751
to
4754cf2
Compare
I fixed the Travis build, and we're now building and testing a gx and a non-gx version version. |
@raulk Could you have another look at this PR please? |
@marten-seemann sorry for the delay here. We've been in conversations re: gx and gomod elsewhere, and I wanted to see where those went before taking action here. We are slowly phasing in support for gomod in IPFS and libp2p. Some modules like go-libp2p-kad-dht already have a go.mod file. Thanks to minimal version selection, we can roll gomod support gradually and lazily. We are also maintaining gx support (as IPFS and others use it). Both dependency managers can co-exist. Here's what I'm thinking re: QUIC:
WDYT? cc/ @anacrolix -- the gomod warrior/preacher 😛 |
FYI – I forked |
I've enabled CircleCI for this repo. I have a branch that contains go mod files that pass the tests. However CircleCI refuses to run the tests, it locks up part way through: https://circleci.com/gh/libp2p/go-libp2p-quic-transport/4. |
As I said in quic-go/quic-go#1788, my proposal is the following: For the next quic-go release I'll add go mod support to qtls, quic-go and this repository.
WDYT? |
@marten-seemann I'd like us to solve the packaging issue ASAP, as it's blocking downstream adopters who are excited about experimenting with libp2p QUIC, and cannot because of packaging issues. I think the correct way of resolving is to push the missing commit to https://github.com/marten-seemann/qtls. Right now, if you erase the Are you able to push this commit: marten-seemann/qtls-deprecated@591c71538704 to https://github.com/marten-seemann/qtls, and place it in a That would allow us to proceed with the long-term solution here (go mod), rather than vendoring now just to move to go mod later. |
@marten-seemann I recovered the commit from the
Then I think everything will work again. |
@raulk and @anacrolix Sorry for all the hassle caused, I didn't expect that moving this repo would cause any problems. And thanks a lot for figuring out this solution. |
I don't think a go-get-safe package is a goal here anymore? If the package is compatible with go-mod, it may not be worth the additional maintenance for the vendored stuff. Not only does it bloat the repo, it's also ignored by gx and go mod. However if that's not the case, I'll merge it. @marten-seemann do you still want this? |
@marten-seemann thanks for cooperating! If you don't mind, I'm gonna close this PR without merging as we're favouring gomod everywhere. If we really need to vendor because some downstreams don't use gomod, we can use SGTY? Reopen if not. |
Fixes #41.