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

Plans on migrating to use multiformats #311

Closed
alvin-reyes opened this issue Apr 9, 2022 · 6 comments · Fixed by #360
Closed

Plans on migrating to use multiformats #311

alvin-reyes opened this issue Apr 9, 2022 · 6 comments · Fixed by #360
Labels
effort/days Estimated to take multiple days, but less than a week exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/maintenance Work required to avoid breaking changes or harm to project's status quo P2 Medium: Good to have, but can wait until someone steps up

Comments

@alvin-reyes
Copy link
Collaborator

Hello Maintainers,

I'm trying to extend the ipld-explorer-components to add support to explore CAR and I noticed that the following modules are now deprecated.

"cids"
"multibase"
"multicodec"
"multihashes"

It is superseded by the multiformats module: https://www.npmjs.com/package/multiformats.

Question, are there any plans to upgrade? I figured since I'm extending the explorer, I might as well upgrade the module.

Thank you.

@ipfs ipfs deleted a comment from welcome bot Apr 10, 2022
@lidel
Copy link
Member

lidel commented Apr 10, 2022

🦗 (there are no maintainers nor plans)

@alvin-reyes If you have time to do the refactor and the update, I can help with reviewing and merging.
The main caveat is that this component is used in both https://github.com/ipld/explore.ipld.io and https://github.com/ipfs/ipfs-webui and has to work in both places.

@lidel
Copy link
Member

lidel commented Apr 19, 2022

Update:

@lidel lidel added help wanted Seeking public contribution on this issue exp/intermediate Prior experience is likely helpful P2 Medium: Good to have, but can wait until someone steps up kind/maintenance Work required to avoid breaking changes or harm to project's status quo effort/days Estimated to take multiple days, but less than a week labels Apr 19, 2022
@rvagg
Copy link
Member

rvagg commented Apr 20, 2022

Worth noting that this switch is going to introduce problems for the Ethereum and Git examples in the explore since we don't have updated codecs for these. I have a Bitcoin codec that is half-way there (there was an intermeditate @ipld/block that came before multiformats as an experiment in next-gen JS IPLD that it was based on, I haven't quite upgraded it yet, it's a bit complex and has been a very low priority). We could also probably make adapters for the existing codecs if they're important, or perhaps we decide that they are important enough to properly port and just get it done—it's really a matter of prioritisation. Alternatively we ditch the bespoke codecs from the list, and maybe add other interesting examples, maybe even a dag-jose block which is now supported down through go-ipfs and js-ipfs.

@SgtPooki
Copy link
Member

SgtPooki commented Jul 5, 2022

I think the first step is defining migration steps. e.g. what are the migration steps for

import CID from 'cids'
import normaliseDagCbor from './normalise-dag-node'

and https://github.com/ipfs/ipld-explorer-components/blob/master/src/lib/resolve-ipld-path.test.js#L2-L10 ?

There are a large number of dependents for all of these deprecated packages:

https://www.npmjs.com/browse/depended/cids
https://www.npmjs.com/browse/depended/multibase
https://www.npmjs.com/browse/depended/multicodec
https://www.npmjs.com/browse/depended/multihashes

and each dependent may be using them differently.. we need to dive into it to figure out what we need to support

@lidel
Copy link
Member

lidel commented Jul 7, 2022

Last time I looked at normalize- logic + things that changed in JS IPLD libraries made me think the only way to resolve this mess is to remove all legacy libraries and rewrite everything with new js-multiformats.

I suspect old examples may be problematic, but there is no point in having Ethereum / Git examples if nobody can use them, so if we don't have working codecs, we should remove broken examples and replace them with working ones (ipld/explore.ipld.io#74, ipld/explore.ipld.io#62 (comment))

@SgtPooki
Copy link
Member

This should be fixed when #359 is resolved

@SgtPooki SgtPooki mentioned this issue May 25, 2023
12 tasks
@github-project-automation github-project-automation bot moved this from Needs Grooming to Done in IPFS-GUI (PL EngRes) Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/days Estimated to take multiple days, but less than a week exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/maintenance Work required to avoid breaking changes or harm to project's status quo P2 Medium: Good to have, but can wait until someone steps up
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants