-
Notifications
You must be signed in to change notification settings - Fork 5
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: add entity matcher w/o preload, add matcher fn for consuming bytes #52
Conversation
FYI, this .. works, replacing unixfs-preload return ssb.ExploreInterpretAs("unixfs-preload", ssb.Matcher()) with return ssb.ExploreInterpretAs("unixfs", ssb.ExploreUnion(ssb.Matcher(),
ssb.ExploreRecursive(
selector.RecursionLimitDepth(1),
ssb.ExploreAll(ssb.ExploreRecursiveEdge()),
),
)) and consuming bytes in a matcher. But I think it fails for the non-unixfs case where we want to match "entity". I wonder was that why this approach wasn't taken with the original request that sparked unixfs-preload (filecoin data explorer IIRC)? Or was there something else I'm missing? |
My explanation here is that |
@rvagg doesn't this still traverse the dir links? It's not the same no? Therefore it traverses more than the required bytes? |
a17ba69
to
de5cbf7
Compare
de5cbf7
to
166be19
Compare
Ready for review now, updated OP with this:
|
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.
LGTM
Draft, WIP, for experimenting withfilecoin-project/lassie#306MatchUnixFSEntitySelector
as a replacement forMatchUnixFSPreloadSelector
that doesn't use unixfs-preload. Added a possible deprecation notice toMatchUnixFSPreloadSelector
.BytesConsumingMatcher
as a matcher function fortraversal.WalkMatching
that will slurp bytes for you upon match, designed for use with theMatch*
selectors in here.