Skip to content

feat: parse optional flat enums#463

Open
4dawit wants to merge 6 commits intoAleph-Alpha:mainfrom
4dawit:allow-option-flat-enum
Open

feat: parse optional flat enums#463
4dawit wants to merge 6 commits intoAleph-Alpha:mainfrom
4dawit:allow-option-flat-enum

Conversation

@4dawit
Copy link

@4dawit 4dawit commented Jan 9, 2026

Goal

Closes #461

Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

@4dawit 4dawit force-pushed the allow-option-flat-enum branch 3 times, most recently from 7633dc9 to d212ed6 Compare January 9, 2026 23:10
@4dawit 4dawit marked this pull request as ready for review January 13, 2026 02:02
Copy link
Author

@4dawit 4dawit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love is_enum and optional_inline_flattened, but I couldn't figure out another way to pass in the context otherwise (couldn't access IS_OPTION with field_ty like in optional.rs since enum isn't a field, also struggled with not panicking inline_flattened() on Option<T> if T is an enum). There might be other cases to be handled (serde un/tagged, etc), please feel free to give feedback or refactor.

@4dawit 4dawit force-pushed the allow-option-flat-enum branch 2 times, most recently from 3883d99 to c5010bd Compare March 5, 2026 19:30
@4dawit 4dawit force-pushed the allow-option-flat-enum branch from c5010bd to c73f4b3 Compare March 5, 2026 20:22
@4dawit
Copy link
Author

4dawit commented Mar 5, 2026

Follow up: I rebased and see that is_enum was created for something else, any updates on implementing something or adopting changes from this PR to close #461?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Support optional flattened enums

1 participant