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

blocked: import go-ipld-cbor interface #8

Merged
merged 1 commit into from
Jan 31, 2020
Merged

Conversation

frrist
Copy link
Member

@frrist frrist commented Jan 30, 2020

@frrist frrist self-assigned this Jan 30, 2020
go.mod Outdated
Comment on lines 18 to 19

replace github.com/ipfs/go-ipld-cbor => ../../ipfs/go-ipld-cbor
Copy link
Member Author

Choose a reason for hiding this comment

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

will remove before merging

Copy link
Member

@anorth anorth left a 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) {
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

Importing itself?

Copy link

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
Copy link
Member

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.

@frrist frrist merged commit 7dd31be into master Jan 31, 2020
}
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 {
Copy link
Member

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

@anorth anorth deleted the frrist/import-cbor-store branch September 29, 2020 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants