This repository has been archived by the owner on Oct 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 165
Conversation
This file contains 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
Build fails because using go-ipfs compatible dag-cbor requires ipld/libipld#30 and thus using the same relative path rust-ipld. |
koivunej
commented
Apr 14, 2020
koivunej
commented
Apr 14, 2020
koivunej
commented
Apr 14, 2020
koivunej
commented
Apr 14, 2020
koivunej
force-pushed
the
add_refs_endpoint
branch
from
April 14, 2020 16:20
0a0d59a
to
cb81c5a
Compare
koivunej
force-pushed
the
add_refs_endpoint
branch
from
April 15, 2020 09:38
f00061b
to
22d54c4
Compare
koivunej
commented
Apr 15, 2020
koivunej
force-pushed
the
add_refs_endpoint
branch
from
April 15, 2020 10:52
a99f274
to
5def58d
Compare
koivunej
force-pushed
the
add_refs_endpoint
branch
from
April 15, 2020 11:59
5def58d
to
c35d2b3
Compare
at least the test case seems to work, now left is pretty much mapping the options and the path handling.
accidentially commited a dangling closing brace.
still need to figure out the Send + Sync + 'static bound, issue is with Sync, which might come from the refs used, get_block(&cid)..
this required some unsafety to be able to present the Stream as Send + Sync + 'static as required by hyper. not 100% sure if that pin_project is ok to do, but the only interfaces exposed are callable as futures so it shouldn't be too bad.
this is required to have multiple paths.
I had not originally noticed that we need to do the walk from multiple paths.
originally it was easier to write everything to the same file, but it gets difficult to read after 1000 lines. while reorganising stuff into more tight modules, some direct calls were changed not to be needed, like RefsOptions creating the EdgeFormatter; the EdgeFormatter is not created in the refs function itself. chopped off parts: * RefsOptions stuff to refs/options.rs * EdgeFormatter and the string format to refs/format.rs * Unshared to refs/unshared.rs * HandledErr StreamResponse to refs/support.rs
the situation is not good, as it would make sense to re-export libipld from ipfs as parts are already re-exported but with strange names.
kept the return value as a stream. it'll at least save us the trouble of concatenating all of the values into a big vector.
koivunej
force-pushed
the
add_refs_endpoint
branch
from
April 15, 2020 13:56
c35d2b3
to
e67f819
Compare
Finally ready for review. I'll still try to collapse the commits to something more useful or write a squash message. |
koivunej
commented
Apr 15, 2020
aphelionz
reviewed
Apr 15, 2020
aphelionz
reviewed
Apr 15, 2020
koivunej
commented
Apr 15, 2020
aphelionz
approved these changes
Apr 15, 2020
koivunej
force-pushed
the
add_refs_endpoint
branch
from
April 16, 2020 10:42
7407376
to
d1da378
Compare
@aphelionz I added some test cases which will catch any changes in Ipld structure read from dag-pb on upgrade, and some path tests based on comments. Please reply if this is still approved and I'll squash with a pretty message. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Builds on #137 and later #155
TODO:
refs.js
to not useipfs.add
andipfs.object.put
Refactor refs tests ipfs/js-ipfs#2972maybe figure out an abstraction for dag-pb2ipld traversal?just separatedI'll be rebasing and probably separating the needless
mut
removal, which is probably a clippy issue why that wasn't picked up. Apparently the clippy or the compiler don't support linting on this at the moment.