oxidecomputer / oxidecomputer/typify
Add an option to preserve the original field order
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 898
- Forks
- 114
- Avg merge
- 4h 18m
- Merged PRs (30d)
- 14
Description
I was experimenting with deriving a visitor for models generated by Typify with derive_visitor but it sorts the struct fields unconditionally which changes the visit order. Ideally there should be an option in TypeSpaceSettings to disable the sorting.
Contributor guide
No contributing guide indexed for this repository
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
Locate TypeSpaceSettings and the code that unconditionally sorts struct fields. Read how visitor generation handles field order, then add the requested setting so sorting can be disabled while preserving the existing behavior by default. Done means generated visitors can retain the original schema field order when the option is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100