-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Make the EventSource
generator incremental et.al.
#64579
Make the EventSource
generator incremental et.al.
#64579
Conversation
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti, @safern Issue DetailsThe Fixes #64563. c.c. @danmoseley
|
src/libraries/System.Private.CoreLib/generators/EventSourceGenerator.Emitter.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/generators/EventSourceGenerator.Parser.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/generators/EventSourceGenerator.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/generators/EventSourceGenerator.Parser.cs
Outdated
Show resolved
Hide resolved
410e3d9
to
a306b12
Compare
src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.Parser.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.Parser.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.cs
Outdated
Show resolved
Hide resolved
I updated the generator to only use the semantic model provided by Can you review it again? |
src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.cs
Outdated
Show resolved
Hide resolved
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.
You'll want to implement IEquatable<>
on the EventSourceClass to ensure you don't do duplicate work unnecessarily, but otherwise LGTM.
src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.Emitter.cs
Outdated
Show resolved
Hide resolved
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 approach is much better! So glad to see the compilation issue resolved 👍
src/libraries/System.Private.CoreLib/gen/EventSourceGenerator.Parser.cs
Outdated
Show resolved
Hide resolved
The problematic compilation-ignoring comparer has been eliminated in favor of clean data extraction.
All PR feedback was addressed. For the record, source generators (especially the incremental ones) are awesome. |
@stephentoub @noahfalk @hoyosjs just a friendly ping, any concerns with moving forward with this change? |
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 only skimmed, but LGTM. Thanks!
Is this good to merge now? |
@danmoseley Looks good from the compiler side, modulo the revert of |
OK, I reverted to |
Build what? Oh crap, I had built it from VS and it worked. I will take a look soon. 😥 |
The code was significantly shrunk.
Not actually needed, and reduces indentation.
Make EventSourceClass a record, use method groups instead of lambdas, and rename a parameter.
ebd8b7b
to
ba0f865
Compare
Turns out #66434 changed the location of |
ba0f865
to
ee127b9
Compare
Ahhh, what went wrong this time? @chsienki I removed |
Thanks @teo-tsirpanis ! |
BTW are you still on vacation @noahfalk? Perhaps you forgot to clear your GitHub profile status. |
nope I've been back a good while, thanks for the heads up : ) |
The
EventSource
generator was made incremental and its output is marked as auto-generated. (TIL GitHub doesn't let me reopen a PR if I have force-pushed its branch)Fixes #64563.
c.c. @danmoseley