Skip to content
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

Merged
merged 4 commits into from
Oct 18, 2023

Conversation

jjonescz
Copy link
Member

@jjonescz jjonescz commented Aug 22, 2023

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 22, 2023
@@ -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";
Copy link
Member

@333fred 333fred Aug 23, 2023

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.

Copy link
Member Author

@jjonescz jjonescz Aug 24, 2023

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

Copy link
Member

@333fred 333fred Aug 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just have multiple constants.

Copy link
Member

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.

Copy link
Member Author

@jjonescz jjonescz Aug 24, 2023

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.

Copy link
Member

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.

Copy link
Member Author

@jjonescz jjonescz Oct 17, 2023

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.

@jjonescz jjonescz marked this pull request as ready for review October 13, 2023 11:40
@jjonescz jjonescz requested review from a team as code owners October 13, 2023 11:40
@jjonescz
Copy link
Member Author

@dotnet/razor-compiler for reviews, thanks

@jjonescz
Copy link
Member Author

@333fred @jaredpar @chsienki PTAL

@@ -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"),
Copy link
Member

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?

Copy link
Member Author

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.

@jaredpar jaredpar merged commit 18dcb81 into dotnet:main Oct 18, 2023
24 checks passed
@ghost ghost added this to the Next milestone Oct 18, 2023
@jjonescz jjonescz deleted the razor8400-RenameCompilerDlls branch October 19, 2023 07:53
@jjonescz jjonescz modified the milestones: Next, 17.9 P1 Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants