-
Notifications
You must be signed in to change notification settings - Fork 191
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
Push tag helper checksums into the compiler #9367
Push tag helper checksums into the compiler #9367
Conversation
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 mainly looked at the tooling changes, but LGTM.
Just for my curiousity, does the checksum builder actually have to be shared? Or is it just to keep the builder and checksum class close to each other. I couldn't see anything in the PR but might have missed it.
src/Shared/Microsoft.AspNetCore.Razor.Utilities.Shared/Utilities/Checksum.cs
Outdated
Show resolved
Hide resolved
src/Shared/Microsoft.AspNetCore.Razor.Utilities.Shared/Resources/SR.resx
Outdated
Show resolved
Hide resolved
src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TagHelperDescriptorComparerTest.cs
Show resolved
Hide resolved
src/Compiler/Microsoft.AspNetCore.Razor.Language/test/RazorDiagnosticTest.cs
Outdated
Show resolved
Hide resolved
...mpiler/Microsoft.AspNetCore.Mvc.Razor.Extensions/test/RazorPageDocumentClassifierPassTest.cs
Show resolved
Hide resolved
Is there a reason why it shouldn't be in the shared project? It's a general mechanism for building SHA-256 checksums. I don't see a reason they should be separated. |
No, not at all. I'm just wondering if I missed something in the PR, and there is a scenario where checksums still need to be created on the tooling side. |
I just figured that it was a generally useful type, so it was reasonable to go into the shared layer. It's not tied to tag helpers in anyway, and is useful for producing SHA-256 checksums of potentially any object. |
src/Compiler/Microsoft.AspNetCore.Razor.Language/src/MetadataCollection.cs
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Rather than compute tag helper checksums at the tooling layer, this change pushes checksums into the compiler. The biggest benefit of this is that tag helpers now use checksums to test for equality and produce hash codes. So, the old tag helper comparers can be completely deleted, and equality checks should get faster across the board.