-
Notifications
You must be signed in to change notification settings - Fork 104
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
feat: export dag walkers #414
Conversation
Thanks for opening this PR. Could you speak a little to the use-case that requires exporting these separately? The default set of DAG Walkers are always configured on a Helia node and are available via the .dagWalkers property - any extras passed to the config are merged in to the default list. |
It's simply using them outside of Helia. This file implements the most common DAG walkers and rather than copy/paste them into my project it makes sense to just be able to import them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think exporting dag-walkers (and other code here) would be useful for consumers, but the real question is, do we want to maintain support for these here.
We discussed this in the Helia WG last week. I think we would need to move these to a separate utils package that can be maintained by the community instead of surfacing as a part of the public Helia API |
The suggestion on maintainers call was to add a method to each IPLD codec that yields CIDs from a block corresponding to that codec, but I don't even think we need to do that - we can use the existing This is how it used to be done in We may end up removing the dag walkers here entirely to reduce code bloat, which is also why things shouldn't be exported unless they are being used. |
I'm going to close this as it's not necessary to export these as part of the Helia API, though thank you for opening this PR and for taking the time to explain your reasoning. Follow-up: #447 |
This simple PR just exports the dag-walkers functionality out of utils saving the need to re-implement it if it is required.