Skip to content
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

fix: use blockstore interface where possible #417

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

achingbrain
Copy link
Member

Instead of depending on the Helia Blocks interface, depend on Blockstore as none of the extra methods are used.

This improves compatibility with other modules and allows reuse from non-Helia contexts.

Instead of depending on the Helia `Blocks` interface, depend on
`Blockstore` as none of the extra methods are used.

This improves compatibility with other modules and allows reuse
from non-Helia contexts.
@achingbrain achingbrain requested a review from a team as a code owner February 5, 2024 18:16
Copy link
Member

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code changes look fine.

Q: Are we sure we don't want an abstraction layer? I get the type benefits for now, but future extensibility could be hindered by not having an abstraction layer?

counterpoint: I can't think of how we would want to extend the blockstore other than your sessionBlockstore.

@achingbrain
Copy link
Member Author

future extensibility could be hindered by not having an abstraction layer?

Perhaps, but YAGNI and all that. We can re-evaluate if requirements change in the future.

@achingbrain achingbrain merged commit 30c8981 into main Feb 6, 2024
18 checks passed
@achingbrain achingbrain deleted the fix/use-blockstore-where-possible branch February 6, 2024 06:01
@achingbrain achingbrain mentioned this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants