-
Notifications
You must be signed in to change notification settings - Fork 997
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
Fix generator incrementality #8388
Conversation
@@ -44,7 +45,7 @@ internal class ApplicationConfigurationGenerator : IIncrementalGenerator | |||
return; | |||
} | |||
|
|||
string? code = ApplicationConfigurationInitializeBuilder.GenerateInitialize(projectNamespace: GetUserProjectNamespace(syntaxNodes[0]), applicationConfig); |
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.
Collecting a bunch of nodes and using only the first node looks suspicious. I just kept the existing behavior, but definitely worth revisiting.
src/System.Windows.Forms.Analyzers/src/System/Windows/Forms/ApplicationConfig.cs
Show resolved
Hide resolved
@Youssef1313 , i was about to ask on issue but can you please add description on these changes and why they are being made now in this PR? |
Currently, the generator pipeline has |
@Youssef1313 while you're at it, do you think you could fully-qualify these types as well (to avoid issues similar to #7346): Lines 32 to 36 in 503bff4
|
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
A couple of the |
HighDpiMode = PropertyDefaultValue.DpiMode, | ||
UseCompatibleTextRendering = true | ||
}, | ||
new ApplicationConfig( |
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.
@Youssef1313 , any specific reason to opt to change order of prams in tests instead of in record
constructor?
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.
No. It just happened that when I wrote the record, I matched the order here:
Lines 31 to 38 in 7fd92af
ApplicationConfig projectConfig = new() | |
{ | |
EnableVisualStyles = enableVisualStyles, | |
DefaultFont = font, | |
HighDpiMode = highDpiMode, | |
UseCompatibleTextRendering = useCompatibleTextRendering | |
}; | |
return (projectConfig, null); |
as I was focusing more on the generator updates rather than tests.
Fixes #8386
Proposed changes
Customer Impact
Regression?
Risk
Screenshots
Before
After
Test methodology
Accessibility testing
Test environment(s)
Microsoft Reviewers: Open in CodeFlow