Skip to content

Update repository and path for Razor repo#313011

Open
davidwengier wants to merge 1 commit intomicrosoft:mainfrom
davidwengier:patch-1
Open

Update repository and path for Razor repo#313011
davidwengier wants to merge 1 commit intomicrosoft:mainfrom
davidwengier:patch-1

Conversation

@davidwengier
Copy link
Copy Markdown
Member

We merged the Razor repo into Roslyn so the source for the cshtml tmLanguage needs to change.

Copilot AI review requested due to automatic review settings April 28, 2026 12:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Razor extension’s grammar update script to pull the cshtml TextMate grammar from the Razor sources after they were merged into the dotnet/roslyn repository.

Changes:

  • Switch the upstream grammar repository from dotnet/razor to dotnet/roslyn.
  • Update the upstream path to the aspnetcorerazor.tmLanguage.json file within the Roslyn repo layout.

Comment on lines +40 to 42
const razorGrammarRepo = 'dotnet/roslyn';
const grammarPath = 'src/Razor/src/Razor/src/Microsoft.VisualStudio.RazorExtension/EmbeddedGrammars/aspnetcorerazor.tmLanguage.json';
vscodeGrammarUpdater.update(razorGrammarRepo, grammarPath, './syntaxes/cshtml.tmLanguage.json', grammar => patchGrammar(grammar), 'main');
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

This switches the upstream grammar source to dotnet/roslyn, but the Razor extension’s tracked upstream metadata is still pointing at dotnet/razor (e.g. extensions/razor/cgmanifest.json and the information_for_contributors/version fields in syntaxes/cshtml.tmLanguage.json). To keep attribution/compliance and contributor guidance accurate, please also update the cgmanifest entry to dotnet/roslyn and refresh the generated grammar file (typically by running this updater and committing the updated cshtml.tmLanguage.json with the new upstream commit link).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants