have the spec and implementations agree on how tuple reprs support optional fields
- Dominant language
- Go
- Stars
- 152
- Forks
- 50
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 2
Description
The implementation at https://github.com/ipld/go-ipld-prime/blob/e39d20bf18dcc21a50ef2005bae6de11e5c311e0/schema/gen/go/genStructReprTuple.go#L13 says they are allowed as trailing fields:
> // Optional fields for tuple representation are only allowed at the end, and contiguously.
However, the current spec at https://ipld.io/docs/schemas/features/representation-strategies/#struct-tuple-representation says:
> Optional or implicit fields are not possible with the tuple Struct representation strategy, all elements must be present.
For now, bindnode follows codegen; see https://github.com/ipld/go-ipld-prime/pull/368.
We should probably adjust the docs to agree with the codegen. cc @warpfork @rvagg
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.