filecoin-project / go-state-types

Primitive and low level types used in chain state and actor method parameters
Other
24 stars 37 forks source link

Update market SectorDealIDs type for transparent serialization. #238

Closed anorth closed 7 months ago

anorth commented 7 months ago

See https://github.com/filecoin-project/FIPs/pull/917

anorth commented 7 months ago

@magik6k please help me, I don't know how to get cbor-gen to accept this. I'm getting

panic: reflect: NumField of non-struct type []abi.DealID

goroutine 1 [running]:
reflect.(*rtype).NumField(0x0?)
    /opt/homebrew/Cellar/go/1.21.4/libexec/src/reflect/type.go:762 +0x6c
github.com/whyrusleeping/cbor-gen.ParseTypeInfo({0x1030851a0?, 0x140001b3138?})
    /Users/me/go/pkg/mod/github.com/whyrusleeping/cbor-gen@v0.0.0-20230923211252-36a87e1ba72f/gen.go:183 +0x100
github.com/whyrusleeping/cbor-gen.WriteTupleEncodersToFile({0x10300e3b6, 0x20}, {0x103004682, 0x6}, {0x140001b7158, 0x16, 0x0?})
    /Users/me/go/pkg/mod/github.com/whyrusleeping/cbor-gen@v0.0.0-20230923211252-36a87e1ba72f/writefile.go:21 +0xa0
main.main()
    /Users/me/pl/src/filecoin-project/go-state-types/builtin/v13/gen/gen.go:112 +0x1150
exit status 2
make: *** [gen] Error 1
magik6k commented 7 months ago

Done in https://github.com/filecoin-project/go-state-types/pull/236/commits/24c91c4340d0afc0b76bd16c90ff1e39cbb4f070 Required extending cbor-gen a little - https://github.com/whyrusleeping/cbor-gen/pull/91