-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Reduce dependency footprint #445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, this feedback helps a lot. Thanks for opening the issue. And yes, we are planning to discuss this next week. / cc @whyrusleeping @bigs |
Ditto from the Keep team- @rargulati has been grappling with it this week |
@gballet @mhluongo make sure to only vendor .go files (no markdown, yaml, _test.go, etc). If I rememeber correctly, this is how i've seen a few different vendoring tools do it. They basically do an import of the code via the go importer and pull in only those files. I suspect that would help significantly. |
Let's figure out where things are getting pulled in unwanted, and modularize to avoid that. |
Raw notes from a discussion we had about this problem tonight: libp2p/notes#4 No specific conclusions were reached, but the information may be helpful for context. |
Understood, indeed we could remove around 150 files by just deleting all LICENSE and README.md ! This is not going to be enough, but it's sure to help. |
FYI, you can use: go list -f '{{.Deps}}' To list all used packages and then use copy only files ending in |
@raulk any thoughts here or status updates? |
We did one consolidation a few months ago, when we introduced go-libp2p-core. And the plan is to do another consolidation by merging go-libp2p-core into go-libp2p, along with default implementations of replaceable components like the peerstore, connmgr, network, etc. Potentially even hosting transports, secure channels, and muxers (pluggable components) that do not introduce much/no dependency footprint (e.g. tcp, noise, tls, mplex). Things like WebRTC, WS, Yamux, etc. would stay in their separate repos. That’s the best marriage I can think of between modularity/extensibility and codebase simplicity. |
This should have been resolved by our more recent rounds of repo consolidation. go-libp2p essentially is a mono-repo now. |
This issue is created as a result of an ongoing conversation with @raulk over the switch from devp2p to libp2p in Ethereum; I have made two attempts at making a libp2p version
Since we vendor most of our code, it makes a lot of members of our core-team un-happy. Here's a non-exhaustive list of pain points that apparently is going to be useful for a design meeting that you will be having soon:
Hope that is helps with the discussion, if you need more details let me know.
The text was updated successfully, but these errors were encountered: