-
Notifications
You must be signed in to change notification settings - Fork 32
Applies 'global::' across the board for design time and runtime code generation #34
Conversation
TanayParikh
left a comment
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.
LGTM, just some nits. Regarding the actual baseline test files, just did some spot checks.
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentLoweringPass.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentLoweringPass.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentLoweringPass.cs
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/TypeNameHelper.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDesignTimeNodeWriter.cs
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentLoweringPass.cs
Show resolved
Hide resolved
pranavkm
left a comment
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.
Very cool!
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentLoweringPass.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/TypeNameHelper.cs
Show resolved
Hide resolved
...deGenerationTest/AsyncEventHandler_OnElement_ActionEventArgs_Lambda/TestComponent.codegen.cs
Outdated
Show resolved
Hide resolved
...sts/ComponentRuntimeCodeGenerationTest/BodyAndAttributeChildContent/TestComponent.codegen.cs
Outdated
Show resolved
Hide resolved
...RuntimeCodeGenerationTest/ComponentWithConstrainedTypeParameters/UseTestComponent.codegen.cs
Show resolved
Hide resolved
...t/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicComponent_Runtime.codegen.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/TypeNameHelper.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDesignTimeNodeWriter.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDesignTimeNodeWriter.cs
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDesignTimeNodeWriter.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDesignTimeNodeWriter.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDesignTimeNodeWriter.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentDocumentClassifierPass.cs
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentLoweringPass.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentLoweringPass.cs
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Razor.Language/src/Components/ComponentRuntimeNodeWriter.cs
Outdated
Show resolved
Hide resolved
Cleanups Co-authored-by: Tanay Parikh <[email protected]>
7867809 to
0f3541c
Compare
|
🆙 📅 Any other feeback? |
SteveSandersonMS
left a comment
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.
Nice! Updates look good, and thanks for checking on the various questions.
|
Just a side-conversation on work on the Razor compiler: does anyone have any good suggestions for how we can make the code review workflow reasonable when "update baselines" generates 1000+ changes? The specific problems I encountered were:
I know we plan to do a lot more Razor Compiler work soon, so would be great to come up with any system to improve this. For example:
Any other ideas @javiercn? How did you review this, @pranavkm? |
|
@SteveSandersonMS this is a particularly challenging one because we were changing the code generation part in a very cross-cutting way. I don't expect most changes to be this impactful and to be more localized in general. In general, when I had to deal with reviews like this, as an author you probably saw that I updated code and baselines in separate commits as to make it easier to see on each individual commit; in the same vein, as a reviewer, if the PR has these sort of changes and makes it hard to review on GH, I pull it down and perform a When I started working on this I was planning on breaking down the PR using a "case by case" approach, but that caused a lot of extra work as its easy to make multiple changes or discover that you need to make changes because they don't play well with other required changes (they are not independent). In general, even if you need to go through lots of files, changes in these files are very similar. There's obviously room for improvement here, but in general it's hard to do this other than breaking it up in individual commits/updates (some of which will still update hundreds of baseline files) In my own testing, what I did was craft a regex and use VS Code search to find places where I missed using Its also hard to predict that we didn't break anything, other than by the fact that we have a myriad of tests and that they all check that the code compiles successfully. Which means that if we mess something up, its not common nor critical (hopefully), but we can never be sure. I would like to see if we can find ways to leverage more "real world" apps to test changes in the compiler, but that'll require some thinking through. |
Fixes dotnet/aspnetcore#18757