-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Rename Razor compiler assemblies #69655
Conversation
@@ -41,7 +41,7 @@ public Factory() | |||
} | |||
|
|||
private const string RazorEncConfigFileName = "RazorSourceGenerator.razorencconfig"; | |||
private const string RazorSourceGeneratorAssemblyName = "Microsoft.NET.Sdk.Razor.SourceGenerators"; | |||
private const string RazorSourceGeneratorAssemblyName = "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators"; |
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.
This is just an intermediate assembly name while we verify things aren't broken. I'd say lets include both the intermediate and final assembly names here, then we can strip the intermediate when we're done with it.
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'm not sure what you mean. How would I update uses of this constant if I added both names here?
I think when we are done with this intermediate assembly, we will redo this PR, renaming
-Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators
+Microsoft.CodeAnalysis.Razor.Compiler
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.
Just have multiple constants.
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.
To spell out my concern more explicitly: coordinated insertions are pain. Anything we can do to avoid needing to coordinate insertions between multiple repos is good, and if we need to add a bit of extra code to handle "next state" and "next state + 1" at the same time, I think that's worth it.
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.
Just have multiple constants.
Yes, but the current constant is used in GetGeneratedDocumentPathWithoutExtension
(and maybe elsewhere). How should the second new constant be used? Duplicate everything and search both possible directories? Seems more complicated than updating the constant again later.
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.
Think we should include the old assembly names, the intermediate and new assembly names. This will help support us thourgh the transition period. Can come back later and clean it up once we are past it.
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.
Talked with Jared offline, I now understand more what you mean (and what this code does), will look into it.
@dotnet/razor-compiler for reviews, thanks |
@@ -118,7 +118,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim | |||
providerFactory.Extensions = | |||
{ | |||
({ | |||
Path.Combine(TempRoot.Root, "RazorVsix", "Microsoft.NET.Sdk.Razor.SourceGenerators.dll"), | |||
Path.Combine(TempRoot.Root, "RazorVsix", "Microsoft.CodeAnalysis.Razor.Compiler.SourceGenerators.dll"), |
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.
Is this another place where we're going to need to update in the future when the assembly name changes?
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.
Probably, but it's just tests so I hope that won't be a problem.
Counterpart to dotnet/razor#9129.
Validation build: https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_build/results?buildId=8555076&view=results
VS insertion: https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/504980