planetscale / planetscale/vtprotobuf
Deterministic mode
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
Upstream proto has a "deterministic" mode: https://github.com/protocolbuffers/protobuf-go/blob/f221882bfb484564f1714ae05f197dea2c76898d/proto/encode.go#L50
I think this is more-strict than marshal_strict (but I could be wrong) in that it also sorts maps.
Interestingly, there is a "Stable" field here: https://github.com/planetscale/vtprotobuf/blob/96ede25e29a0325741fd05d6e9e48364d65ea137/features/marshal/marshalto.go#L43. but its never used.
It might be nice to add this option, or if its already possible documentation around it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the upstream deterministic mode in proto/encode.go with features/marshal/marshalto.go, including the unused Stable field. Determine whether deterministic behavior is already available or requires a new option, then define completion as either implementing that option or documenting the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100