roslyn-sdk
roslyn-sdk copied to clipboard
Move source gen samples to the incremental model and source to C# 10
This PR encompasses two things:
- Move the code to C# 10.
- Move the generator model to the incremental model.
Lingering doubts:
- Is the incremental model the recommended one, aka is the previous one obsolete?
- Is the Readme still a faithful representation of the status?
@lucabol Thanks! I'll take a detailed look through. From a quick glance I think some of the samples could be more incremental so I'll make sure to focus on how to optimize them.
I think it would be best to resubmit a conversion of just one of the source generators. The change should emphasize the change from ISourceGenerator
to IIncrementalGenerator
, and omit all other style-type changes. I have so many objections to the style changes in this pull request I do not see any way for it to proceed in its current form.
I pushed a small change to the generators to fix the generated file names. It should be a relatively easy merge (and you can use a82885063e6ec8f84932ee650f75cb47c0ee8d84 as a reference if you want).