-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/6.0] Fix TimeSpan support in sourcegen #62191
Conversation
Tagging subscribers to this area: @dotnet/area-system-text-json Issue DetailsBackport of #62130 to release/6.0 /cc @eiriktsarpalis Customer ImpactTestingRisk
|
Servicing approved over email. |
Closing and reopening to get CI to run again. |
...ries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/RealWorldContextTests.cs
Show resolved
Hide resolved
@ericstj @eiriktsarpalis do we need to address feedback? |
Sure, I can help with that since @eiriktsarpalis is out. |
Browser failures of S.T.J are an existing issue. #61524 I upgraded it to a tracking issue. |
Remaining failures are #58927 |
Backport of #62130 to release/6.0
/cc @eiriktsarpalis
Customer Impact
This is a customer reported bug (#62082). System.Text.Json added support for
TimeSpan
serialization (see #54186), however this was not extended to source generators. As a result, reflection and sourcegen serializers by default diverge in their handling of TimeSpan instances. While it is fairly straightforward for users to work around the issue, we believe this should be addressed in servicing sooner rather than later when we ship the next major release.Testing
Added integration tests verifying serialization and deserialization support for
TimeSpan
in source generators.Risk
Low to minimal. Product code change simply flags
TimeSpan
as a "known type" thereby defaulting generated code to the built-in converter.