Skip to content

Conversation

@nenoNaninu
Copy link
Contributor

Currently, MessagePackAnalyzer does not analyze records, so adding a [MessagePackObject] attribute to the type used in the field is forgotten and may cause a runtime error.

image

@AArnott AArnott added this to the v2.5 milestone Oct 27, 2023
Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Thank you for this, @nenoNaninu, for noticing, the fix and especially the tests.
Can you add a test for the shorter record syntax?
e.g.

[MessagePackObject]
public record Bar([property: Key(0)] Foo Member);

I suppose we should make sure this works too.

And BTW, the analyzer has undergone substantial refactoring in the develop branch, so if you make any more interesting changes to the analyzer to address this new test, please merge with develop first (and we can retarget your PR to that branch) as going forward we want to work on develop without a bunch of merge conflicts with main.

Thanks again.

@nenoNaninu
Copy link
Contributor Author

Thanks for the quick response.

I had a conflict when merging the develop branch, so I created a new PR #1698.

@nenoNaninu nenoNaninu closed this Oct 29, 2023
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