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

add flatten #34

Merged
merged 8 commits into from
Feb 1, 2024
Merged

add flatten #34

merged 8 commits into from
Feb 1, 2024

Conversation

realbigsean
Copy link
Member

@realbigsean realbigsean commented Jan 30, 2024

Resolves #30

@realbigsean realbigsean marked this pull request as ready for review January 31, 2024 00:57
@michaelsproul
Copy link
Member

awesome! will review tomorrow

@realbigsean
Copy link
Member Author

realbigsean commented Jan 31, 2024

fixed a little bug here, but now this is working in lighthouse sigp/lighthouse#5158

Also a limitation right now is we don't have a way to nest inner types that have a subset of variants of the outer type. I think vice-versa should work though (haven't tested it). So nesting an execution payload in a block in lighthouse wouldn't benefit from this for example.

@realbigsean
Copy link
Member Author

Also a limitation right now is we don't have a way to nest inner types that have a subset of variants of the outer type. I think vice-versa should work though (haven't tested it). So nesting an execution payload in a block in lighthouse wouldn't benefit from this for example.

This actually wasn't so bad to get working, I added it here: 76b67a1

@michaelsproul
Copy link
Member

I pushed a bugfix for an issue I noticed with using the field_index to modify the variant_fields. If there are earlier fields that aren't on a variant (due to only), then the field index from the whole struct will not be the location of the field in the variant_fields. I added a test that fails without my change, and passes with it, but I could do with a second pair of eyes on it

52eba9f

@michaelsproul
Copy link
Member

I also think we want to use the last part of the path, e.g. types::ExecutionPayload we want ExecutionPayload not types: 30f768f

Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

I can't spot any other issues, so I think this is good to merge!

@michaelsproul michaelsproul added this pull request to the merge queue Feb 1, 2024
Merged via the queue into sigp:main with commit b5e746c Feb 1, 2024
3 checks passed
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: Variant propagation in nested superstructs
2 participants