-
Notifications
You must be signed in to change notification settings - Fork 95
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
Consolidate IPFS Path libraries under boxo/path
#198
Comments
I'm up for consolidating the three repositories/types into a single package in |
I agree this looks like it could be cleaned up. I would wait for the consolidation dust to settle before merging refactors like this though, just to make it a bit easier for consumers to upgrade. |
Agreed. Lets get the "vX" release out that doesn't have any refactoring so there is a way for consumers to more easily update. Then cleanup/refactor. |
Here is the tracking issue for the over the "over the hump" release: #202 . This refactor won't get merged into |
go-libipfs/path
boxo/path
How many
clownspath deps can you fit ina clown carone line of code?During review of Gateway API refactor from #176, I've realized there are cases, when we use three "path types" from three different libraries. This culminated in this fun one-liner:
ipath
is https://github.com/ipfs/go-path (includes resolvers, see Allow injecting custom path resolvers. kubo#9750)ipfspath
is https://github.com/ipfs/interface-go-ipfs-core/tree/master/pathImmutablePath
is recent invention ingo-libipfs/gateway
because above did not provide a type for representing this stateProposed path forward
Thoughts on deduplicating/consolidating under
boxo/path
?It honestly feels like if go-libipfs has a purpose, it is to provide a solution for reusable things like this.
I feel we will make better Gateway API in #176 if we don't use
ifacepath
but use a singlego-libipfs/path
library that coversPath
,Immutable
andResolved
states with distinct types/interfaces.I assume we want to follow "copy" strategy from #191 here, to minimize blast radius?
We could make this consolidation in steps, first switch gateway, so the public interface from #176 only uses types from
boxo/path
, and in the future switch namesys/kubo to that as well.Things to look out for
During the consolidation, the following issues and Pull Requests from the relevant repositories should be taken into consideration.
cc @ipfs/kubo-maintainers for feedback (paths are everywhere, and as much as I'd like to clean this up, I don't want to add unnecessary work for anyone)
The text was updated successfully, but these errors were encountered: