Support to analyze records and record structs#1694
Closed
nenoNaninu wants to merge 2 commits intoMessagePack-CSharp:masterfrom
Closed
Support to analyze records and record structs#1694nenoNaninu wants to merge 2 commits intoMessagePack-CSharp:masterfrom
nenoNaninu wants to merge 2 commits intoMessagePack-CSharp:masterfrom
Conversation
AArnott
requested changes
Oct 27, 2023
Collaborator
AArnott
left a comment
There was a problem hiding this comment.
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.
Contributor
Author
|
Thanks for the quick response. I had a conflict when merging the develop branch, so I created a new PR #1698. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.