Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Remove support for old-style links #84

Closed
vmx opened this issue Oct 15, 2018 · 6 comments
Closed

Remove support for old-style links #84

vmx opened this issue Oct 15, 2018 · 6 comments

Comments

@vmx
Copy link
Member

vmx commented Oct 15, 2018

Currently there's still support for old style {"/": "base-encoded-cid"} style links. I think we should remove the support for this, so that consumers don't have "silent" breakage where a serialisation works as before, but de-serialisation doesn't.

@mikeal
Copy link
Contributor

mikeal commented Oct 15, 2018

I'm +1 on doing this after js-ipfs has moved completely to the new API.

Enforcing a symmetrical encode/decode seems like a good idea and the new IPLD specs have abandoned any "canonical" format.

@daviddias daviddias added the status/deferred Conscious decision to pause or backlog label Oct 27, 2018
@vmx
Copy link
Member Author

vmx commented May 8, 2019

Done with the release of version 0.14.

@vmx vmx closed this as completed May 8, 2019
@ghost ghost removed the status/deferred Conscious decision to pause or backlog label May 8, 2019
@alanshaw
Copy link
Member

We implemented dag put on the CLI but because ipld-dag-cbor no longer supports this format for linking no links can be made:

$ echo '{ "link": { "/": "bafyreidl34zuzoltv3ijlunrilncnzmczx53lfco4dzc6o77xy2f4dq7ce" } }' | ipfs dag put

Obviously we can't pass CID instances to IPLD from the CLI.

We're going to patch js-ipfs to convert these objects into CID instances until go-ipfs drops support for this.

Other ideas welcome!

@mikeal
Copy link
Contributor

mikeal commented Nov 25, 2019

You should be able to just decode the JSON w/ the dag-json parser and then pass the decoded object on to whatever encoder they actually want. That link format is still the internal dag-json link format so it should work.

@alanshaw
Copy link
Member

I think this is a good shout, but dag-json is not currently a dependency so I'm hesitant to add it.

@mikeal
Copy link
Contributor

mikeal commented Nov 26, 2019

You could just wait until you take the new Block API, dag-json is in the default set of codecs and there’s better support for selectively including codecs when you want to trim the bundle.

In general, we should find creative ways to dynamically load the codecs we need instead of bundling them. If this feature is only needed by the CLI then we should pull that codec into the CLI utility and not into the entire default IPLD API.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants