go-libp2p icon indicating copy to clipboard operation
go-libp2p copied to clipboard

After repo consolidation, prune deps

Open MarcoPolo opened this issue 3 years ago • 6 comments

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.

MarcoPolo avatar Jul 07 '22 21:07 MarcoPolo

  • [ ] Drop gogo protobuf (unsupported) assuming we can get compatibility and performance from google's protobuf.

Stebalien avatar Jul 12 '22 13:07 Stebalien

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!

CmdrVasquess avatar Jul 18 '22 18:07 CmdrVasquess

I'm getting the exact same error when trying to use v0.20.3.

fredcarle avatar Aug 12 '22 16:08 fredcarle

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).

marten-seemann avatar Aug 12 '22 16:08 marten-seemann

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.

fredcarle avatar Aug 12 '22 16:08 fredcarle

I managed to resolve it on my side. Seems to have been from another package importing a different version and causing problems.

fredcarle avatar Aug 15 '22 17:08 fredcarle

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.

marten-seemann avatar Jan 12 '23 04:01 marten-seemann