Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

fix(resolver): LookupBySegment to handle list indexes as well as map fields #42

Merged
merged 2 commits into from
Aug 6, 2021

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Jul 26, 2021

@hannahhoward this one is for you into your branch - handle indexes in paths as well as map fields.

Found via the go-ipfs t0280-plugin-git sharness: ipfs dag get baf4bcfhzi72pcj5cc4ocz7igcduubuu7aa3cddi/object/parents/0/tree/dir2/hash/f3/hash

Copy link
Contributor

@hannahhoward hannahhoward left a comment

Choose a reason for hiding this comment

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

LGTM by me

Were you working on a test you wanted to try?

@rvagg
Copy link
Member Author

rvagg commented Jul 28, 2021

@hannahhoward I've added a test that exercises this

@hannahhoward hannahhoward merged commit 6814a6f into feat/ipld-in-ipfs Aug 6, 2021
hannahhoward added a commit that referenced this pull request Aug 12, 2021
* Use go-fetcher, unixfsnode, and ipld-prime to resolve paths. (#34)

* first pass

* Update resolver/resolver.go

Co-authored-by: Eric Myhre <hash@exultant.us>

* update dependencies to tagged versions

* correctly handles nested nodes within blocks

* return link from resolve path so we can fetch container block

* return expected NoSuchLink error

* more accurate errors

* feat(resolver): remove resolve once

remove ResolveOnce as it's no longer used and is just confusing

Co-authored-by: acruikshank <acruikshank@example.com>
Co-authored-by: Eric Myhre <hash@exultant.us>
Co-authored-by: hannahhoward <hannah@hannahhoward.net>

* fix(update to tagged branches): update to tagged branches and use node reifier

* fix(deps): update go-unixfsnode

* fix(deps): update to latest go fetcher (#37)

* feat(resolver): take fetcher config as parameter (#38)

* fix(deps): switch to tagged go-fetcher

* fix(resolver): removed ipldcbor dependency

* fix(mod): remove unneeded deps

* fix(resolver): correct comments

* test(resolver): add test verifying ErrNoLink functionality

* fix(lint): fix lint errors

resolve go vet and staticcheck issues. note we had to ignore two lines that use deprecated
behavior, but which replacing could have unintended effects

* fix(resolver): LookupBySegment to handle list indexes as well as map fields (#42)

* fix(resolver): LookupBySegment to handle list indexes as well as map fields

* Add test for /mixed/path/segment/types/1/2/3

* feat(resolver): address more PR comments

* style(tests): add clarification

* style(lint): fix lint errors, redo test fix

* fix(deps): update deps to tagged version

Co-authored-by: Alex Cruikshank <169613+acruikshank@users.noreply.github.com>
Co-authored-by: acruikshank <acruikshank@example.com>
Co-authored-by: Eric Myhre <hash@exultant.us>
Co-authored-by: Rod Vagg <rod@vagg.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants