-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add unsupported language detection to the STJ source generator #87950
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 unsupported language detection to the STJ source generator #87950
Conversation
… and emit error diagnostics.
|
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsThis PR:
It should be noted that the minimum supported language version for STJ is C# 9. This is because a number of "JsonMetadataServices" models use init-only properties.
|
| using System; | ||
| using System.Text.Json.Serialization; | ||
| [assembly: JsonSerializable(typeof(int))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (and a number of other unit tests) are calling early source gen APIs that were eventually removed before the SG was shipped.
| using System.Collections.Generic; | ||
| using System.Text.Json.Serialization; | ||
| [assembly: JsonSerializable(typeof(Fake.Location))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing test using a deprecated activation gesture that no longer compiles succesfully.
This PR:
It should be noted that the minimum supported language version for STJ is C# 9. This is because a number of "JsonMetadataServices" models use init-only properties.