Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

refs and resolve don't work with sharded directories #2389

Closed
lidel opened this issue Aug 22, 2019 · 5 comments
Closed

refs and resolve don't work with sharded directories #2389

lidel opened this issue Aug 22, 2019 · 5 comments
Assignees
Labels
exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) kind/resolved-in-helia P3 Low: Not priority right now status/ready Ready to be worked

Comments

@lidel
Copy link
Member

lidel commented Aug 22, 2019

Filling this so we don't forget to match recent fixes in go-ipfs (ipfs/kubo#6596)

Version information:

0.37.0

Description:

jsipfs refs does not work with HAMT-sharded unixfs directories:

$ jsipfs refs -r /ipfs/QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX/wiki/Mars.html
Failed to get refs for /ipfs/QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX/wiki/Mars.html: Object has no property 'wiki'

same problem with ipfs resolve:

$ jsipfs resolve -r /ipfs/QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX/wiki/
Object has no property 'wiki'

Interop notes

resolve works fine in go-ipfs v0.4.22 and refs was fixed in ipfs/kubo#6596 and will land in v0.5.0

@lidel lidel added the kind/bug A bug in existing code (including security flaws) label Aug 22, 2019
@achingbrain
Copy link
Member

I wonder if we couldn't refactor all the refs code to use the unixfs-exporter - it operates on paths, will return dag-pb, dag-cbor, etc nodes and handles all the hamt stuff transparently.

@dirkmc
Copy link
Contributor

dirkmc commented Aug 23, 2019

Originally I wrote it to use unixfs-exporter, but I believe at that time unixfs-exporter didn't have a streaming API, and it would only traverse unixfs objects. Have both of those things changed now?
See conversation here: #2004 (comment)

@achingbrain
Copy link
Member

Yes - it's all async iterators now and has resolvers for common types - we can always add more.

@dirkmc
Copy link
Contributor

dirkmc commented Aug 23, 2019

Great 🎉

@alanshaw alanshaw added exp/expert Having worked on the specific codebase is important P3 Low: Not priority right now status/ready Ready to be worked labels Aug 27, 2019
@whizzzkid
Copy link

whizzzkid commented May 31, 2023

js-ipfs is being deprecated in favor of Helia. You can follow the migration plan here #4336 and read the migration guide.

This issue has been resolved in Helia! if this does not address your concern please let us know by reopening this issue before 2023-06-05!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) kind/resolved-in-helia P3 Low: Not priority right now status/ready Ready to be worked
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants