-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Enumerate available encodings for dag get #8171
Conversation
License: MIT Signed-off-by: hannahhoward <hannah@hannahhoward.net>
License: MIT Signed-off-by: hannahhoward <hannah@hannahhoward.net>
DO NOT MERGE DO NOT REVIEW
License: MIT Signed-off-by: hannahhoward <hannah@hannahhoward.net>
License: MIT Signed-off-by: hannahhoward <hannah@hannahhoward.net>
This should fix a sharness test failure which we fixed by changing PBNode decoding to allow any field order.
49c78d7
to
cdde999
Compare
Write a `sharness` test that expects failure documenting the issue raised in #3503. The issue may get resolved in the refactoring of `ipfs dag get` command to support go-ipld-prime (e.g. #8171). For now add a `sharness` test that expects failure. We will then flip the expectation in the success in the rewriting PR to check if #3503 gets resolved. Relates to: - #3503
42155c4
to
6522df1
Compare
9b6af8e
to
7a975b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UX sidenote: fysa it is possible to enumerate all codecs in ipfs cid codecs --numeric
, I think it would be useful to add something like --supported
there, so user knows which codecs can be processed by the node and the ipfs dag get|put
helptext for input-enc
and format
could refer to ipfs cid codecs --supported
for list of available options.
@aschmahmann What's the status of this PR? Asking in relation to the description in #8471. |
I suspect this PR can be closed (it's certainty very out of date). I'd refer @lidel's solution above (#8171 (review)) as probably the correct way to do this. @willscott if you feel otherwise please reopen the PR and remind me what I'm missing here. |
This, i believe, is the basic sketch of what would be needed to late bind connection of the
dag get
subcommand.It attempts to optimistically load plugins before help, which will work except for some edge cases (like that a config is passed in on stdin that sets which directory to find plugins in).
It then gets the root command via method to provide a way for the commands package to allow the dag package to do finalization of its command struct and attach enumerable encoders.
Thoughts on if this makes sense or alternative constructions, @aschmahmann ?