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

Turn on the Roslyn lexer by default for .NET 10 Razor projects #45808

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

333fred
Copy link
Member

@333fred 333fred commented Jan 9, 2025

We want to turn on the new lexer by default for Razor projects targeting .NET 10, to get feedback on the experience as soon as possible. This enables that experience.

@333fred 333fred requested a review from a team as a code owner January 9, 2025 00:32
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member labels Jan 9, 2025
@333fred
Copy link
Member Author

333fred commented Jan 9, 2025

@dotnet/razor-compiler for reviews.
Commit 1 - Create a .NET 10 configuration block with copied settings from .NET 9.
Commit 2 - Add the new switches for use-roslyn-tokenizer.

Copy link
Contributor

Thanks for your PR, @333fred.
To learn about the PR process and branching schedule of this repo, please take a look at the SDK PR Guide.

<_TargetingNET90OrLater>true</_TargetingNET90OrLater>
<_TargetingNET100OrLater>true</_TargetingNET100OrLater>
<UseRazorSourceGenerator Condition="'$(Language)' == 'C#' AND '$(UseRazorSourceGenerator)' == '' ">true</UseRazorSourceGenerator>
<RazorLangVersion Condition="'$(RazorLangVersion)' == '' ">9.0</RazorLangVersion>
Copy link
Member

Choose a reason for hiding this comment

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

I assume this is intentionally 9.0 not 10.0 because we want to switch to newer lang version only later in the cycle?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct; I also expect that putting 10.0 here would break until the razor compiler knows what that is.

@333fred
Copy link
Member Author

333fred commented Jan 9, 2025

@dotnet/product-construction, the unified builds are failing due to a missing JDK. Any idea what's going on?

@jkoritzinsky
Copy link
Member

The JDK issue was fixed by #45822.

@333fred
Copy link
Member Author

333fred commented Jan 9, 2025

Thanks @jkoritzinsky, merged in main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants