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

coreapi: replace coreiface.DagAPI with ipld.DAGService #5922

Merged
merged 1 commit into from
Jan 21, 2019

Conversation

magik6k
Copy link
Member

@magik6k magik6k commented Jan 12, 2019

As api.Dag() is the interface to IPLD, this feels like the right thing to do.

This wasn't done this way before because we keep format parsers in a global map in core/coredag, exposing ipld interfaces directly would make it tricky for outside code to do things like parse json to dag-cbor, but from my experience most Go code which touches IPLD doesn't really need those parsers.

(Since this is mostly a yes/no decision, I'd like this to move relatively fast as it's blocking a chunk of work in go-ipfs-http-api)

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
@magik6k magik6k added need/community-input Needs input from the wider community topic/core-api Topic core-api labels Jan 12, 2019
@magik6k magik6k requested a review from Kubuxu as a code owner January 12, 2019 15:15
@ghost ghost assigned magik6k Jan 12, 2019
@ghost ghost added the status/in-progress In progress label Jan 12, 2019
@magik6k magik6k mentioned this pull request Jan 14, 2019
51 tasks
Copy link
Contributor

@schomatis schomatis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have enough knowledge of the CoreAPI but this feels more natural to me.

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this is the right direction. I'm going to merge this now as the interface in go-ipfs is unstable but we need to make sure that ipfs-interface-core matches.

@magik6k
Copy link
Member Author

magik6k commented Jan 21, 2019

make sure that ipfs-interface-core matches

Conceptually using go-ipld-format.DAGService is going to be closer to js/ipfs-interface-core, only the names are a bit different - put/Add, get/Get, tree/Resolver.Tree

@Stebalien
Copy link
Member

SGTM.

@Stebalien Stebalien changed the title [RFC] coreapi: replace coreiface.DagAPI with ipld.DAGService coreapi: replace coreiface.DagAPI with ipld.DAGService Jan 21, 2019
@Stebalien Stebalien merged commit 2e83a0a into master Jan 21, 2019
@ghost ghost removed the status/in-progress In progress label Jan 21, 2019
@Stebalien Stebalien deleted the feat/coreapi/dag-ipld branch January 21, 2019 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/community-input Needs input from the wider community topic/core-api Topic core-api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants