Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

unixfs: feat tree building #284

Merged
merged 57 commits into from
Aug 10, 2020
Merged

unixfs: feat tree building #284

merged 57 commits into from
Aug 10, 2020

Conversation

koivunej
Copy link
Collaborator

@koivunej koivunej commented Aug 5, 2020

Includes a BufferingTreeBuilder which kind of follows the js-ipfs implementation: a complete tree is built from path segments and later it's converted into a dag-pb by an "iterator" which walks the tree in post order, converting (rendering) the most nested elements first. Communication back to the "parent" is done using a HashMap<u64, Vec<Option<(String, Cid, usize)>>> which relies on initial ordering provided by BufferingTreeBuilder by using BTreeMap's on each level.

@koivunej koivunej changed the title Add tree building unixfs: feat tree building Aug 5, 2020
koivunej pushed a commit to eqlabs/rust-ipfs that referenced this pull request Aug 6, 2020
this uses the rust 1.45 features to remove recursion inside the macro.
great for rs-ipfs#284 which adds even more complicated async-stream(s).
bors bot added a commit that referenced this pull request Aug 6, 2020
288: fix: update async-stream to 0.3 r=ljedrz a=koivunej

this uses the rust 1.45 features to remove recursion inside the macro. great for #284 which adds even more complicated async-stream(s).

good to go if CI passes.

Co-authored-by: Joonas Koivunen <[email protected]>
@koivunej
Copy link
Collaborator Author

koivunej commented Aug 6, 2020

I'll force push once #288 is merged with the few TODO comments which are missing. I am still thinking if I should render the AddErrors as StringError as a new json line since that's the best we can do. It might even trigger an error on the js-ipfs-http-client side which would be better than hanging.

bors bot added a commit that referenced this pull request Aug 6, 2020
288: fix: update async-stream to 0.3 r=ljedrz a=koivunej

this uses the rust 1.45 features to remove recursion inside the macro. great for #284 which adds even more complicated async-stream(s).

good to go if CI passes.

Co-authored-by: Joonas Koivunen <[email protected]>
bors bot added a commit that referenced this pull request Aug 6, 2020
288: fix: update async-stream to 0.3 r=ljedrz a=koivunej

this uses the rust 1.45 features to remove recursion inside the macro. great for #284 which adds even more complicated async-stream(s).

good to go if CI passes.

Co-authored-by: Joonas Koivunen <[email protected]>
bors bot added a commit that referenced this pull request Aug 6, 2020
288: fix: update async-stream to 0.3 r=ljedrz a=koivunej

this uses the rust 1.45 features to remove recursion inside the macro. great for #284 which adds even more complicated async-stream(s).

good to go if CI passes.

Co-authored-by: Joonas Koivunen <[email protected]>
@koivunej koivunej force-pushed the add_tree_building branch 3 times, most recently from b5bf673 to aab2e82 Compare August 6, 2020 12:55
@koivunej koivunej marked this pull request as ready for review August 6, 2020 13:01
@koivunej
Copy link
Collaborator Author

koivunej commented Aug 6, 2020

I think this is now ready for review. Thanks to npm for providing me focus time to try out the perf enchancements (which could be dropped off if they look bad enough) :)

@koivunej koivunej requested a review from ljedrz August 6, 2020 13:02
@koivunej
Copy link
Collaborator Author

koivunej commented Aug 6, 2020

@koivunej koivunej force-pushed the add_tree_building branch from a6ce6f9 to 7446810 Compare August 9, 2020 19:25
@koivunej
Copy link
Collaborator Author

bors r+

bors bot added a commit that referenced this pull request Aug 10, 2020
284: unixfs: feat tree building r=koivunej a=koivunej

Includes a `BufferingTreeBuilder` which kind of follows the js-ipfs implementation: a *complete* tree is built from path segments and later it's converted into a dag-pb by an "iterator" which walks the tree in post order, converting (rendering) the most nested elements first. Communication back to the "parent" is done using a `HashMap<u64, Vec<Option<(String, Cid, usize)>>>` which relies on initial ordering provided by `BufferingTreeBuilder` by using BTreeMap's on each level.

Co-authored-by: Joonas Koivunen <[email protected]>
Co-authored-by: Joonas Koivunen <[email protected]>
@koivunej
Copy link
Collaborator Author

@koivunej
Copy link
Collaborator Author

Same with bors... Interesting.

bors r-

@bors
Copy link
Contributor

bors bot commented Aug 10, 2020

Canceled.

@koivunej
Copy link
Collaborator Author

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 10, 2020

Build succeeded:

@bors bors bot merged commit e00198a into rs-ipfs:master Aug 10, 2020
@koivunej koivunej mentioned this pull request Aug 10, 2020
6 tasks
@koivunej koivunej mentioned this pull request Sep 23, 2020
@koivunej koivunej deleted the add_tree_building branch September 24, 2020 12:56
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