Move source gen samples to the incremental model and source to C# 10#985
Move source gen samples to the incremental model and source to C# 10#985lucabol wants to merge 22 commits intodotnet:mainfrom
Conversation
…lay all classes to showcase the predicate and transform functions.
|
@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. |
| using Microsoft.CodeAnalysis.Text; | ||
|
|
||
| namespace SourceGeneratorSamples | ||
| namespace SourceGeneratorSamples; |
There was a problem hiding this comment.
❗ This change needs to be in a separate pull request (if at all). Generally, significant style changes like this are only accepted after internal discussion and created by a member of the team at a time that's least likely to interfere with other work in progress.
There was a problem hiding this comment.
I am a bit confused. I am in an email thread with the team members about these changes and everyone is aware of them. I would hate to have done all this work for nothing. I will forward the thread to you. Please discuss with them and let me know how to proceed.
|
I think it would be best to resubmit a conversion of just one of the source generators. The change should emphasize the change from |
|
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 a828850 as a reference if you want). |
| var collected = fields.Collect() | ||
| .Combine(context.CompilationProvider); | ||
|
|
||
| context.RegisterSourceOutput(collected, GenerateCode); |
There was a problem hiding this comment.
That's not incremental at all, I think.
This PR encompasses two things:
Lingering doubts: