You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove Roslyn-Reflection helper abstraction from System.Text.Json source generator #79533
These helpers provide a conversion from Roslyn metadata to Reflection metadata. They predated the JSON generator (developed by @davidfowl), and were copied into the initial version of the source generator for the following reasons:
The developers were more familiar with Reflection APIs and could make progress more expeditiously with the abstraction
There was an expectation that there would be a non-trivial amount of Reflection-based code shared between the source-generator and reflection-based implementations of JsonSerializer.
Both reasons no longer hold. The amount/utility of the code shared between the implementations does not justify the additional complexity to maintain the abstraction. There's no good reason to not read the metadata from Roslyn APIs directly.
Activity
eiriktsarpalis commentedon Dec 12, 2022
This would effectively require rewriting the source generator. Not saying we shouldn't do it, but is it something we could budget for in 8.0.0?
layomia commentedon Dec 12, 2022
Likely not tbh. I'm fine with making this "future".