Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix issues about the equality of AnalyzerOptions and FormatterDescriptor #1874

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

Merged

Conversation

AlanLiu90
Copy link
Contributor

IncrementalSourceGenerator requires objects can be compared by content, so it can use cached value if nothing changes.

Currently, AnalyzerOptions uses default Equals implementation which doesn't meet the requirement and FormatterDescriptor doesn't compare its all members.

Thie PR fixes these two issues.

@AArnott
Copy link
Collaborator

AArnott commented Jul 5, 2024

Thanks. But if you test it, I think you'll find there is no bug to fix. C# record types come with an override of Equals that is implement with by-value equality semantics!

@AArnott AArnott closed this Jul 5, 2024
@AArnott
Copy link
Collaborator

AArnott commented Jul 5, 2024

Ah, I see what you were fixing now. Thanks.

@AArnott AArnott reopened this Jul 5, 2024
AArnott
AArnott approved these changes Jul 5, 2024
@AArnott AArnott added this to the v3.0 milestone Jul 5, 2024
@AArnott AArnott enabled auto-merge July 5, 2024 22:58
@AArnott AArnott merged commit 998f3c6 into MessagePack-CSharp:develop Jul 5, 2024
4 of 6 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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.