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

Remove temporary APIs now Razor compiler is updated #51252

Merged
merged 9 commits into from
Oct 11, 2023

Conversation

SteveSandersonMS
Copy link
Member

@SteveSandersonMS SteveSandersonMS commented Oct 10, 2023

Remove temporary APIs now Razor compiler is updated

The Razor Compiler now supports @rendermode and @formname natively, so use that.

Description

While waiting for the Razor Compiler's native support for @rendermode and @formname, we had some temporary APIs. They are less nice to use and don't perform as well. We have always planned to remove them by the time .NET 8 ships. This PR actually removes them and switches all the tests and templates over to the new native syntax.

Since this PR is changing the project template anyway, it also implements the "remove unnecessary top-level Components folder in wasm template" (#51167)

Fixes #50225
Fixes #51167

Customer Impact

We have to remove these APIs because otherwise they end up having to be supported forever (or at least, years), and (1) they are now unnecessary and ugly, and (2) they harm perf even if you're not using them, because the way they work requires the renderer to keep checking whether you just used them.

Regression?

  • Yes
  • No

[If yes, specify the version the behavior has regressed from]

Risk

  • High
  • Medium
  • Low

It's a meaningful change to the syntax that also involves some template changes. However we always planned to make this change, and couldn't have done it earlier because the compiler changes were not available until now.

Also we are still waiting for a build of VS that includes the necessary change, so until then, VS will show red squigglies for the new syntax (though it still compiles and runs successfully).

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Oct 10, 2023
@SteveSandersonMS SteveSandersonMS added the Servicing-consider Shiproom approval is required for the issue label Oct 10, 2023
@ghost
Copy link

ghost commented Oct 10, 2023

Hi @SteveSandersonMS. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.

To learn more about how to prepare a servicing PR click here.

@leecow leecow added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Oct 10, 2023
@ghost
Copy link

ghost commented Oct 10, 2023

Hi @SteveSandersonMS. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.

@leecow leecow modified the milestones: 8.0-ga, 8.0.0 Oct 10, 2023
@SteveSandersonMS SteveSandersonMS force-pushed the stevesa/remove-obsolete-apis branch from 075bdd5 to 081eaae Compare October 11, 2023 15:58
@mkArtakMSFT mkArtakMSFT merged commit 6bcf49d into release/8.0 Oct 11, 2023
@mkArtakMSFT mkArtakMSFT deleted the stevesa/remove-obsolete-apis branch October 11, 2023 17:40
@ghost ghost modified the milestone: 8.0.0 Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants