-
Notifications
You must be signed in to change notification settings - Fork 198
Comparing changes
Open a pull request
base repository: dotnet/razor
base: d5cfe11b00e279b96344440e4d9b403994b376de
head repository: dotnet/razor
compare: 3920563359e73a7b8d3c8d7a1bba61bbf1c9efe5
- 13 commits
- 46 files changed
- 3 contributors
Commits on Aug 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 53ec3ab - Browse repository at this point
Copy the full SHA 53ec3abView commit details -
Make Compilation a TagHelperDescriptorProviderContext property
Every single `TagHelperDescriptorProviderContext` created in Razor compiler or tooling code adds a valid compilation. So, adding the compilation to the `ItemsCollection` is pure overhead and no `ITagHelperDescriptorProvider` needs to check it for null. I removed a single test that verified the behavior if a compilation was never set. Now that a compilation is required, this test is no longer needed.
Configuration menu - View commit details
-
Copy full SHA for adff92a - Browse repository at this point
Copy the full SHA adff92aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec5cd16 - Browse repository at this point
Copy the full SHA ec5cd16View commit details -
Remove TagHelperDescriptorProviderContext.Items property
This can be safely removed now that there are no more references.
Configuration menu - View commit details
-
Copy full SHA for 45625bc - Browse repository at this point
Copy the full SHA 45625bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9476634 - Browse repository at this point
Copy the full SHA 9476634View commit details -
Configuration menu - View commit details
-
Copy full SHA for eae0d53 - Browse repository at this point
Copy the full SHA eae0d53View commit details -
Clean up all ITagHelperDescriptorProviders a bit (and found a bug!)
- Enable nullability - Mark all as sealed - Use `Lazy<T>` for singleton `ITagHelperDescriptorProviders` - Introduce `TagHelperDescriptorProviderBase` - Inherit from `TagHelperDescriptorProviderBase` - Remove unnecessary properties - Remove unnecessary property setters In addition, I spotted a bug in `EventHandlerTagDescriptorProvider` while addressing nullability warnings. The buggy code is right here: https://github.com/dotnet/razor/blob/fb84ae5d9bb8132972c2c23cf209721161f81deb/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/CSharp/EventHandlerTagHelperDescriptorProvider.cs#L70-L76 When reading the constructor arguments of an `EventHandlerAttribute` it appears that we swap the last two arguments of the 4-argument variant. The constructor is defined like so: ```C# EventHandlerAttribute(string attributeName, Type eventArgsType, bool enableStopPropagation, bool enablePreventDefault); ``` Unfortunately, the compiler reads the third parameter as `enablePreventDefaeult` and the fourth parameter as `enableStopPropagation`. This has been broken since support for the 4-argument constructor variant was added in 7635bba. Fixing this bug is tracked by #10497.
Configuration menu - View commit details
-
Copy full SHA for 5fbfc0d - Browse repository at this point
Copy the full SHA 5fbfc0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f6c7b6 - Browse repository at this point
Copy the full SHA 9f6c7b6View commit details
Commits on Aug 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4441e1d - Browse repository at this point
Copy the full SHA 4441e1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ed8dcee - Browse repository at this point
Copy the full SHA ed8dceeView commit details -
Move to central package pinning (#10716)
* Move to central package pinning This should make it much easier for us to respond to CG alerts in the future. All that will need to be done is add an entry in Directory.Packages.props and it will automatically impact all consumers of it. Consider this example in Roslyn for how to respond to a CG issue dotnet/roslyn#74653
Configuration menu - View commit details
-
Copy full SHA for cd1f82b - Browse repository at this point
Copy the full SHA cd1f82bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9044af2 - Browse repository at this point
Copy the full SHA 9044af2View commit details
Commits on Aug 12, 2024
-
Remove ItemCollection from TagHelperDescriptorProviderContext (#10720)
Every `TagHelperDescriptorProviderContext` creates an `ItemCollection` to hold onto, at most, two objects: a `Compilation` and a target `ISymbol`. This is enormously wasteful because an `ItemCollection` internally creates a `ConcurrentDictionary<object, object>`. So, I've changed `TagHelperDescriptorProviderContext` to just hold onto a compilation and a target symbol and avoid the `ItemCollection` altogether. I recommend reviewing commit-by-commit. Also, I bumped into a long standing compiler bug in `EventHandlerTagHelperDescriptorProvider` that was recently filed by a customer: #10497. I opted to stay on target and not fix this issue, but I made it painfully obvious where the fix would go. 😄
Configuration menu - View commit details
-
Copy full SHA for 3920563 - Browse repository at this point
Copy the full SHA 3920563View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff d5cfe11b00e279b96344440e4d9b403994b376de...3920563359e73a7b8d3c8d7a1bba61bbf1c9efe5