Commit a845656
authored
TagHelperCollection Part 4: Rewrite Tag Helper Discovery(!) (#12507)
| [Prelude](#12503) | [Part
1](#12504) | [Part
2](#12505) | [Part
3](#12506) | Part 4 | [Part
5](#12509) |
> [!WARNING]
> This pull request contains breaking changes for the RazorSdk. Once
this is merged and flows to the VMR,
dotnet/dotnet@dc17a09
will need to be cherry-picked to resolve build breaks in
`src/sdk/src/RazorSdk`.
Previously, tag helpers were discovered by
`ITagHelperDescriptorProvider`. Each provider was responsible for
walking a compilation's assemblies and producing `TagHelperDescriptors`
from the types within. This change inverts the tag helper discovery
process by introducing `ITagHelperDiscoveryService` and moving the tag
helper construction logic into a set of `TagHelperProducers`. The
`ITagHelperDiscoveryService` performs a single walk of the compilation
or assembly and calls the producers as needed.
Importantly, the new process allows a more expansive cache to be
maintained. There is now a per-assembly cache that holds onto
`TagHelperCollection` instances. The old cache that was owned by
providers via `TagHelperCollector` has been removed.
To complete this change, `ITagHelperDescriptorProvider` and related
types have been _deleted_.
----
CI Build:
https://dev.azure.com/dnceng/internal/_build/results?buildId=2842196&view=results
Toolset Run:
https://dev.azure.com/dnceng/internal/_build/results?buildId=2842249&view=resultsFile tree
76 files changed
+3199
-2941
lines changed- src
- Compiler
- Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X/test
- Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test
- Microsoft.AspNetCore.Mvc.Razor.Extensions/test
- Microsoft.AspNetCore.Razor.Language/test
- Microsoft.CodeAnalysis.Razor.Compiler/src
- CSharp
- Language
- TagHelpers
- Producers
- Mvc.Version1_X
- Mvc.Version2_X
- Mvc
- SourceGenerators
- Microsoft.CodeAnalysis.Razor/test
- Razor
- src
- Microsoft.CodeAnalysis.Razor.Workspaces
- Completion
- Extensions
- Utilities
- Microsoft.CodeAnalysis.Remote.Razor/TagHelpers
- Microsoft.VisualStudio.LanguageServices.Razor/Discovery
- test
- Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting_NetFx
- Microsoft.CodeAnalysis.Razor.Workspaces.Test/ProjectEngineHost
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
76 files changed
+3199
-2941
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
30 | 28 | | |
31 | | - | |
32 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
30 | 28 | | |
31 | | - | |
32 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
30 | 28 | | |
31 | | - | |
32 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
0 commit comments