Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codegen: assembler for struct with map representation validates all non-optional fields are present #121

Merged
merged 1 commit into from
Dec 4, 2020

Conversation

warpfork
Copy link
Collaborator

@warpfork warpfork commented Dec 4, 2020

The NodeAssembler for structs with map representations now correctly validates all non-optional fields are present.

This continues what #111 did and adds the same logic to the map representation. The actual state tracking works the same way (and was mostly already there).

Rearranged the tests slightly.

Made error messages include both field name and serial key when they differ due to a rename directive. (It's possible this error would get nicer if it used a list of StructField instead of just strings, but it would also get more complicated. It may be worth revisiting this later, but for now it seems sufficient.)

…ll non-optional fields are present.

This continues what #111 did
and adds the same logic to the map representation.  The actual state
tracking works the same way (and was mostly already there).

Rearranged the tests slightly.

Made error messages include both field name and serial key when they
differ due to a rename directive.  (It's possible this error would get
nicer if it used a list of StructField instead of just strings, but it
would also get more complicated.  Maybe revisit later.)
@warpfork warpfork force-pushed the codegen-struct-maprepr-assembly-strictness branch from 076b78a to f8d654d Compare December 4, 2020 14:47
@warpfork warpfork merged commit 29d37db into master Dec 4, 2020
@warpfork warpfork deleted the codegen-struct-maprepr-assembly-strictness branch December 4, 2020 15:59
warpfork added a commit that referenced this pull request Dec 13, 2020
Since #121, presence of
fields is actually checked... but that code also doesn't understand
implicit fields yet, which makes us need a lot of filler.

Also the lack of the "members" field for unions?  That was just plain
wrong.  Good think we're catching things like that now.
warpfork added a commit that referenced this pull request Dec 13, 2020
Since #121, presence of
fields is actually checked... but that code also doesn't understand
implicit fields yet, which makes us need a lot of filler.

Also the lack of the "members" field for unions?  That was just plain
wrong.  Good think we're catching things like that now.
@aschmahmann aschmahmann mentioned this pull request May 14, 2021
71 tasks
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.

2 participants