-
Notifications
You must be signed in to change notification settings - Fork 448
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
Consider libp2p mono repo #824
Comments
The other really nice thing we could do with this not listed is releasing preconfigured libp2p nodes more easily with every libp2p release so users don't have to configure anything if they just want something ready to go. |
Some related modules have been grouped together as monorepos since this was opened:
The primary piece of learning from Modules should also be homogeneous in terms of technology, scope and testing - if you have one GUI app in a monorepo and ten tiny utils, releasing changes to the utils takes as long as releasing changes to the GUI app which is a bit nuts. Also flaky tests become that much painful. Also, also, contributors tend to get scared off by the scope of a monorepo. I don't think there are other modules that need grouping together in the libp2p ecosystem so I'm going to close this issue but it's always something worth keeping an eye on. |
The subject of migrating js-libp2p components into a monorepo was brought up by @MarcoPolo and discussed in the 2023-03-07 js-libp2p triage meeting with @achingbrain @wemeetagain @maschad and @p-shahi The reasons for moving to a monorepo given were:
The original proposed solution was to move any potential component a user pulls into a simple js-libp2p app (i.e. TCP, mplex, Yamux, Noise, WebSocket, WebTransport, Interfaces, etc.) into a monorepo.
So instead of one monorepo, our current thought is to create different groupings of smaller monorepos. These would look like:
@MarcoPolo also brought up the idea of using Git subtrees (where one can make changes to a repo directly and from a monorepo pull those changes in or you can make changes from monorepo and push changes out) as an option - but no consensus here. POC: https://github.com/marcopolo/js-libp2p-monorepo |
Having spent more time that I'd like to admit pushing changes around during the IPFS Althing I am becoming more amenable to this as I'd like to spend more time shipping features and less time shipping dependency updates. After
Essentially the first bullet point from the comment above. Docs, examples stay where they are. |
Another problem that we have is releasing changes to modules ahead of libp2p. For example the next libp2p release changes the peer store to be atomic, so that means:
Before 4 is completed there's a window during which js users see an update to a module, upgrade to it and then wonder why stuff doesn't work. Ts users will see a type error, though frequently they will ignore it and also wonder why stuff doesn't work. We cannot control the release schedule of external modules (e.g. This adds a bit of weight to the whole-hog option of adding every supported libp2p module into the js-libp2p monorepo. |
Merging interfaces into internal/interfaces and external/interfaces would be a breaking change. Maintainers have decided to wait on this for a bit, since 0.45.0 was a big breaking change release as well. We'll be doing this in the next month or so. |
Consolidates all interface modules to `@libp2p/interface-libp2p` for external (eg. user-consumable) interfaces and `@libp2p/interface-internal` for interfaces implemented or consumed by internal libp2p modules (services, etc). Closes #824
non-interface modules to monorepo added in #1828 |
Consolidates all interface modules to `@libp2p/interface` for external (eg. user-consumable) interfaces and `@libp2p/interface-internal` for interfaces implemented or consumed by internal libp2p modules (managers, etc). Merges all interface compliance tests and mocks into `@libp2p/interface-compliance-tests` Closes #824
@achingbrain @p-shahi : A few things on this...
|
|
Taking into account the overhead that we experience in libp2p development when sometimes for getting a feature in we need to orchestrate several PRs just to land a change, we should consider turning libp2p into a mono repo. This would also help new contributors as they would not need to know where other modules are and that they would need to be updated (like the interop, in case its tests fail in CI).
Some of the repos that should be considered are the daemon, daemon client and libp2p-interfaces.
This issue should be used for this discussion, where we should put together benefits, drawbacks and lessons learned from
js-ipfs
change into a mono repo.cc @jacobheun @achingbrain @hugomrdias
The text was updated successfully, but these errors were encountered: