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

Fix crash when handling ValueTuples #85

Merged
merged 2 commits into from
Nov 7, 2023
Merged

Conversation

yaakov-h
Copy link
Member

@yaakov-h yaakov-h commented Nov 7, 2023

This includes:

  • Initial support for field serialization
  • Initial support for struct serialization

Fixes #79.

This does not flatten the Rest/TRest property of large ValueTuples. I'm not sure yet if we should do that, or if we should purely represent the runtime layout of the object.

This also uses the "Item1"/"Item2"/... naming, not the modern C# aliases for the fields (e.g. (hello: "world")

This includes:
- Initial support for field serialization
- Initial support for struct serialization

This does not flatten the Rest/TRest property of large ValueTuples.
@yaakov-h yaakov-h requested a review from xPaw November 7, 2023 11:39
@xPaw
Copy link
Member

xPaw commented Nov 7, 2023

There's no test that actually checks for Item1... etc

@yaakov-h
Copy link
Member Author

yaakov-h commented Nov 7, 2023

No, because I wasn't sure yet what we wanted the final output to look like. At the moment this just proves that it doesn't crash.

@yaakov-h
Copy link
Member Author

yaakov-h commented Nov 7, 2023

As discussed on Discord:

  • we can't actually get the tuple element names
  • not worth the effort flattening TRest, if you have a tuple that big then you probably have other problems.

@yaakov-h yaakov-h merged commit de9479a into master Nov 7, 2023
6 checks passed
@yaakov-h yaakov-h deleted the yaakov/fix-79-valuetuple branch November 7, 2023 15:26
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.

Fails to serialize ValueTuple
2 participants