Skip to content

Add Razor shims to ExternalAccess.Razor.#42174

Merged
tmat merged 3 commits intomasterfrom
nimullen/19551
Mar 13, 2020
Merged

Add Razor shims to ExternalAccess.Razor.#42174
tmat merged 3 commits intomasterfrom
nimullen/19551

Conversation

@NTaylorMullen
Copy link

@NTaylorMullen NTaylorMullen commented Mar 4, 2020

  • This is the first step to removing IVT to Razor assemblies from core Roslyn assemblies. Once Razor is able to consume these changes and move to the new APIs we can entirely remove the IVTs from Roslyn assemblies.
  • Brought Razor's IDynamicFileInfoProvider implementation over to the ExternalAccess.Razor package and built a new concept (IRazorDocumentContainer) that allows Razor to pass it just enough information about the document to Roslyn for it to "do the right thing".

dotnet/aspnetcore#19551

@tmat this takes care of all of the IVT dependent Razor APIs 🎁

Razor PR to react to the changes (WIP): dotnet/razor#1655

- This is the first step to removing IVT to Razor assemblies from core Roslyn assemblies. Once Razor is able to consume these changes and move to the new APIs we can entirely remove the IVTs from Roslyn assemblies.
- Brought Razor's `IDynamicFileInfoProvider` implementation over to the ExternalAccess.Razor package and built a new concept (`IRazorDocumentContainer`) that allows Razor to pass it just enough information about the document to Roslyn for it to "do the right thing".

dotnet/aspnetcore#19551
@NTaylorMullen NTaylorMullen requested review from sharwell and tmat March 4, 2020 23:41
@NTaylorMullen NTaylorMullen requested review from a team as code owners March 4, 2020 23:41
@jinujoseph jinujoseph added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Mar 5, 2020
@NTaylorMullen
Copy link
Author

🆙 📅

Refactored Razor.ExternalAccess to leave more logic in Razor.

  • Now IDynamicFileInfoProvider is shimmed and the core-logic exists in the Razor repo.
  • Added the ExternalAccess.Razor piece to the Roslyn deployment to ensure our IDynamicFileInfoProvider wrapper can be found by MEF components. In the case that the Razor workload is not available we allow a null Razor dynamic file implementation.
  • Updated the ExternalAccess.Razor project to be netstandard2.0 instead of net472 so it vibes better with the Razor repo.

- Now `IDynamicFileInfoProvider` is shimmed and the core-logic exists in the Razor repo.
- Added the ExternalAccess.Razor piece to the Roslyn deployment to ensure our `IDynamicFileInfoProvider` wrapper can be found by MEF components. In the case that the Razor workload is not available we allow a `null` Razor dynamic file implementation.
- Updated the ExternalAccess.Razor project to be netstandard2.0 instead of net472 so it vibes better with the Razor repo.

dotnet/aspnetcore#19551
…e DynamicFileInfoProvider not load Razor assemblies in non-Razor scenarios.
@NTaylorMullen
Copy link
Author

🆙 📅

Turn nullable reference types on for ExternalAccess.Razor and make the DynamicFileInfoProvider not load Razor assemblies in non-Razor scenarios.

@tmat tmat merged commit 2540f90 into master Mar 13, 2020
@ghost ghost added this to the Next milestone Mar 13, 2020
@NTaylorMullen NTaylorMullen deleted the nimullen/19551 branch March 13, 2020 19:58
@sharwell sharwell modified the milestones: Next, 16.6.P2 Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants