feat: add entity matcher w/o preload, add matcher fn for consuming bytes#52
Merged
hannahhoward merged 1 commit intomainfrom Jul 7, 2023
Merged
feat: add entity matcher w/o preload, add matcher fn for consuming bytes#52hannahhoward merged 1 commit intomainfrom
hannahhoward merged 1 commit intomainfrom
Conversation
Member
Author
|
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? |
Collaborator
|
My explanation here is that |
Collaborator
|
@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
rvagg
added a commit
to ipld/frisbii
that referenced
this pull request
Jun 30, 2023
rvagg
added a commit
to ipld/frisbii
that referenced
this pull request
Jun 30, 2023
rvagg
added a commit
to ipld/frisbii
that referenced
this pull request
Jun 30, 2023
de5cbf7 to
166be19
Compare
Member
Author
|
Ready for review now, updated OP with this:
|
rvagg
added a commit
to ipld/frisbii
that referenced
this pull request
Sep 2, 2023
rvagg
added a commit
to ipld/frisbii
that referenced
this pull request
Sep 2, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft, WIP, for experimenting withfilecoin-project/lassie#306MatchUnixFSEntitySelectoras a replacement forMatchUnixFSPreloadSelectorthat doesn't use unixfs-preload. Added a possible deprecation notice toMatchUnixFSPreloadSelector.BytesConsumingMatcheras a matcher function fortraversal.WalkMatchingthat will slurp bytes for you upon match, designed for use with theMatch*selectors in here.