Skip to content

Commit

Permalink
feat(deps): update ipld-prime near master
Browse files Browse the repository at this point in the history
update to lastest needed sha for filecoin, reinstitute generated node tests
  • Loading branch information
hannahhoward committed Sep 22, 2020
1 parent 140425a commit c03db7d
Show file tree
Hide file tree
Showing 12 changed files with 2,850 additions and 59 deletions.
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ require (
github.com/ipfs/go-merkledag v0.3.1
github.com/ipfs/go-peertaskqueue v0.2.0
github.com/ipfs/go-unixfs v0.2.4
github.com/ipld/go-ipld-prime v0.5.0
github.com/ipld/go-ipld-prime-proto v0.0.0-20200908180311-da0ab5c81760
github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f
github.com/ipld/go-ipld-prime-proto v0.0.0-20200922000432-18d8669296eb
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c
github.com/jbenet/goprocess v0.1.4 // indirect
github.com/libp2p/go-libp2p v0.6.0
Expand All @@ -39,7 +39,6 @@ require (
github.com/multiformats/go-multihash v0.0.13
github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a // indirect
github.com/smartystreets/assertions v1.0.1 // indirect
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 // indirect
github.com/stretchr/testify v1.5.1
github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d
go.uber.org/multierr v1.4.0 // indirect
Expand Down
18 changes: 6 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,10 @@ github.com/ipfs/go-unixfs v0.2.4 h1:6NwppOXefWIyysZ4LR/qUBPvXd5//8J3jiMdvpbw6Lo=
github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw=
github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E=
github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0=
github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e h1:ZISbJlM0urTANR9KRfRaqlBmyOj5uUtxs2r4Up9IXsA=
github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8=
github.com/ipld/go-ipld-prime v0.0.4-0.20200828224805-5ff8c8b0b6ef h1:/yPelt/0CuzZsmRkYzBBnJ499JnAOGaIaAXHujx96ic=
github.com/ipld/go-ipld-prime v0.0.4-0.20200828224805-5ff8c8b0b6ef/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8=
github.com/ipld/go-ipld-prime v0.5.0 h1:kr3nB6/JcFpc3Yj7vveXYuiVyZJzWUkJyLMjQbnoswE=
github.com/ipld/go-ipld-prime v0.5.0/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8=
github.com/ipld/go-ipld-prime-proto v0.0.0-20200828231332-ae0aea07222b h1:ZtlW6pubN17TDaStlxgrwEXXwwUfJaXu9RobwczXato=
github.com/ipld/go-ipld-prime-proto v0.0.0-20200828231332-ae0aea07222b/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs=
github.com/ipld/go-ipld-prime-proto v0.0.0-20200908180311-da0ab5c81760 h1:U616lpfmDGbaRaKvnecuAEj9T05zmW/IkoaYrWaaU0s=
github.com/ipld/go-ipld-prime-proto v0.0.0-20200908180311-da0ab5c81760/go.mod h1:tDYA+DyZ5+imKlOj/2YqJS5cMAFjWKN4aUBQUw8FvqM=
github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f h1:XpOuNQ5GbXxUcSukbQcW9jkE7REpaFGJU2/T00fo9kA=
github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM=
github.com/ipld/go-ipld-prime-proto v0.0.0-20200922000432-18d8669296eb h1:pNGpxNHva+TCo3SyLe3s4YrBp0PJbbFoOswFoS1A4H8=
github.com/ipld/go-ipld-prime-proto v0.0.0-20200922000432-18d8669296eb/go.mod h1:3pHYooM9Ea65jewRwrb2u5uHZCNkNTe9ABsVB+SrkH0=
github.com/jackpal/gateway v1.0.5 h1:qzXWUJfuMdlLMtt0a3Dgt+xkWQiA5itDEITVJtuSwMc=
github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA=
github.com/jackpal/go-nat-pmp v1.0.1 h1:i0LektDkO1QlrTm/cSuP+PyBCDnYvjPLGl4LdWEMiaA=
Expand Down Expand Up @@ -549,8 +543,8 @@ github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUr
github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 h1:WN9BUFbdyOsSH/XohnWpXOlq9NBD5sGAB2FciQMUEe8=
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY=
github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a h1:/eS3yfGjQKG+9kayBkj0ip1BGhq6zJ3eaVksphxAaek=
github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0=
Expand Down
51 changes: 18 additions & 33 deletions testutil/chaintypes/gen/main.go
Original file line number Diff line number Diff line change
@@ -1,47 +1,32 @@
package main

import (
"os"
"os/exec"

"github.com/ipld/go-ipld-prime/schema"
gengo "github.com/ipld/go-ipld-prime/schema/gen/go"
)

func main() {
openOrPanic := func(filename string) *os.File {
y, err := os.OpenFile(filename, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
if err != nil {
panic(err)
}
return y
}

tLink := schema.SpawnLink("Link")
tBytes := schema.SpawnBytes("Bytes")
tString := schema.SpawnString("String")
tParents := schema.SpawnList("Parents", tLink, false)
tMessages := schema.SpawnList("Messages", tBytes, false)
tBlock := schema.SpawnStruct("Block",
[]schema.StructField{
schema.SpawnStructField("Parents", tParents, false, false),
schema.SpawnStructField("Messages", tMessages, false, false),
},
schema.StructRepresentation_Map{},
)

ts := schema.TypeSystem{}
ts.Init()
adjCfg := &gengo.AdjunctCfg{}
pkgName := "chaintypes"

f := openOrPanic("testchain_minima.go")
gengo.EmitInternalEnums(pkgName, f)

f = openOrPanic("testchain_gen.go")
gengo.EmitFileHeader(pkgName, f)
gengo.EmitEntireType(gengo.NewBytesReprBytesGenerator(pkgName, tBytes, adjCfg), f)
gengo.EmitEntireType(gengo.NewLinkReprLinkGenerator(pkgName, tLink, adjCfg), f)
gengo.EmitEntireType(gengo.NewStringReprStringGenerator(pkgName, tString, adjCfg), f)
gengo.EmitEntireType(gengo.NewListReprListGenerator(pkgName, tParents, adjCfg), f)
gengo.EmitEntireType(gengo.NewListReprListGenerator(pkgName, tMessages, adjCfg), f)
gengo.EmitEntireType(gengo.NewStructReprMapGenerator(pkgName, tBlock, adjCfg), f)
pkgName := "chaintypes"

ts.Accumulate(schema.SpawnLink("Link"))
ts.Accumulate(schema.SpawnBytes("Bytes"))
ts.Accumulate(schema.SpawnString("String"))
ts.Accumulate(schema.SpawnList("Parents", "Link", false))
ts.Accumulate(schema.SpawnList("Messages", "Bytes", false))
ts.Accumulate(schema.SpawnStruct("Block",
[]schema.StructField{
schema.SpawnStructField("Parents", "Parents", false, false),
schema.SpawnStructField("Messages", "Messages", false, false),
},
schema.SpawnStructRepresentationMap(nil),
))
gengo.Generate(".", pkgName, ts, adjCfg)
exec.Command("go", "fmt").Run()
}
30 changes: 30 additions & 0 deletions testutil/chaintypes/minima.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c03db7d

Please sign in to comment.