roslyn-sdk icon indicating copy to clipboard operation
roslyn-sdk copied to clipboard

Move source gen samples to the incremental model and source to C# 10

Open lucabol opened this issue 2 years ago • 3 comments

This PR encompasses two things:

  1. Move the code to C# 10.
  2. Move the generator model to the incremental model.

Lingering doubts:

  1. Is the incremental model the recommended one, aka is the previous one obsolete?
  2. Is the Readme still a faithful representation of the status?

lucabol avatar Apr 27 '22 11:04 lucabol

@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.

chsienki avatar Apr 28 '22 22:04 chsienki

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.

sharwell avatar May 03 '22 15:05 sharwell

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).

sharwell avatar May 05 '22 21:05 sharwell