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

Allow using WalkOption in WriteCar function #357

Merged
merged 1 commit into from
Jan 28, 2023

Conversation

leszko
Copy link
Contributor

@leszko leszko commented Jan 27, 2023

Pass through the merkledag.WalkOption parameters to the underlying merkledag.Walk() function.

This is helpful for a number of use-cases, in particular it allows creating a CAR with missing nodes. E.g., currently it's not possible to create a CAR with raw links pointing to CIDs not present in the local blockstore. After this change, you can use the following:

car.WriteCar(ctx, dagService, []cid.Cid{root.Cid()}, carFile, merkledag.IgnoreErrors())

@willscott
Copy link
Member

I think the general sentiment has been to encourage additional feature development to happen in the v2 branch. Since this is backwards compatible / minor, and since we have continued to maintain the v1 branch I don't see any strong objection to merging.

@willscott willscott merged commit bfc8d73 into ipld:master Jan 28, 2023
Jorropo pushed a commit to ipfs/boxo that referenced this pull request Mar 22, 2023
Allow using WalkOption in WriteCar function

This commit was moved from ipld/go-car@bfc8d73
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