-
Notifications
You must be signed in to change notification settings - Fork 256
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
Move source gen samples to the incremental model and source to C# 10 #985
base: main
Are you sure you want to change the base?
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. |
@@ -7,12 +7,12 @@ | |||
using Microsoft.CodeAnalysis.CSharp.Syntax; | |||
using Microsoft.CodeAnalysis.Text; | |||
|
|||
namespace SourceGeneratorSamples | |||
namespace SourceGeneratorSamples; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❗ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not incremental at all, I think.
This PR encompasses two things:
Lingering doubts: