go-libp2p
go-libp2p copied to clipboard
After repo consolidation, prune deps
This is an issue to remind us to sweep through our deps and remove anything that isn't necessary.
In the past week, I've removed our grpc dep and btcd dep. There are likely more around. This will be much easier after repo consolidation.
- [ ] Drop gogo protobuf (unsupported) assuming we can get compatibility and performance from google's protobuf.
This needs to be done to be able to build with Go modules. When trying to compile go-libp2p/examples/chat copied to a standalone project go mod tidysays:
go: finding module for package github.com/libp2p/go-libp2p
go: found github.com/libp2p/go-libp2p in github.com/libp2p/go-libp2p v0.20.3
go: finding module for package github.com/libp2p/go-libp2p-core/mux
<my fancy example project> imports
github.com/libp2p/go-libp2p imports
github.com/libp2p/go-libp2p/config imports
github.com/libp2p/go-libp2p/p2p/net/upgrader imports
github.com/libp2p/go-libp2p-core/mux: module github.com/libp2p/go-libp2p-core@latest found (v0.19.1), but does not contain package github.com/libp2p/go-libp2p-core/mux
And perhaps mux is now github.com/libp2p/go-mplex, perhaps not??? Tidying deps would be great!
I'm getting the exact same error when trying to use v0.20.3.
And perhaps mux is now github.com/libp2p/go-mplex, perhaps not??? Tidying deps would be great!
No, it's not, and this is totally not what this issue is about. You just need to make sure to import go-libp2p-core and go-libp2p versions that match (take the go-libp2p-core version from the respective go-libp2p version's go.mod file).
And perhaps mux is now github.com/libp2p/go-mplex, perhaps not??? Tidying deps would be great!
No, it's not, and this is totally not what this issue is about. You just need to make sure to import go-libp2p-core and go-libp2p versions that match (take the go-libp2p-core version from the respective go-libp2p version's go.mod file).
I can confirm that I did this and the same problem occurs.
I managed to resolve it on my side. Seems to have been from another package importing a different version and causing problems.
I think we can close this issue now. There's not really anything we can't remove at this point.
With #1979, we've also implemented @Stebalien's suggestion in https://github.com/libp2p/go-libp2p/issues/1646#issuecomment-1181773911.