-
Notifications
You must be signed in to change notification settings - Fork 15
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
blocked: import go-ipld-cbor interface #8
Conversation
go.mod
Outdated
|
||
replace github.com/ipfs/go-ipld-cbor => ../../ipfs/go-ipld-cbor |
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.
will remove before merging
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.
This looks good. I think there's lots of context plumbing that should be done in this package, but probably not in this PR.
amt.go
Outdated
} | ||
} | ||
|
||
func LoadAMT(bs Blocks, c cid.Cid) (*Root, error) { | ||
func LoadAMT(bs cbor.CborIpldStore, c cid.Cid) (*Root, error) { |
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.
This should really take a context parameter.
go.mod
Outdated
@@ -3,14 +3,17 @@ module github.com/filecoin-project/go-amt-ipld/v2 | |||
go 1.12 | |||
|
|||
require ( | |||
github.com/ipfs/go-block-format v0.0.2 | |||
github.com/filecoin-project/go-amt-ipld v1.0.0 |
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.
Importing itself?
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.
It is importing older version. It should not.
go.mod
Outdated
github.com/stretchr/testify v1.3.0 | ||
github.com/whyrusleeping/cbor-gen v0.0.0-20190917003517-d78d67427694 | ||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 | ||
github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a // indirect |
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.
Commentary: it would be very valuable to scope down the dependencies of go-ipld-cbor to avoid large amounts of code being pulled into things like Filecoin.
50c560d
to
d7ff21e
Compare
} | ||
if err := cbg.GenTupleEncodersForType(amt.Node{}, fi); err != nil { | ||
// FIXME this will not generate the correct code, leave the cbor_gen.go file untouched. | ||
if err := cbg.WriteMapEncodersToFile("cbor_gen.go", "amt", amt.Root{}, amt.Node{}); err != nil { |
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.
should also be 'Tuple' instead of Map here
Blocked on ipfs/go-ipld-cbor#70