Skip to content

Allow runtime compilation to be configured via the hosting startup. #39639

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

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

pranavkm
Copy link
Contributor

@pranavkm pranavkm commented Jan 19, 2022

Description

As part of refactoring how Razor Pages are loaded, the ability to use runtime compilation via the hosting startup / env variable was broken. We had this feature enabled via a project template option. Because we removed the option in 6.0 in favor of hot reload, we lost coverage for it and had no end-to-end tests. This change restores support for this feature and adds better test coverage.

Fixes #38465

Customer Impact

Users are unable to use the hosting startup from the runtime compilation package.

Regression?

  • Yes
  • No

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

Risk

  • High
  • Medium
  • Low

The changes are limited to when the runtime compilation is referenced and enabled via the hosting startup feature.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

…otnet#39381)

As part of refactoring how Razor Pages are loaded, the ability to use runtime compilation via the hosting startup / env variable was broken.
The refactoring assumed AddRuntimeCompilation was always invoked after a call to AddRazorPages / AddControllersWithViews etc which is not the case
for registration via the HostingStartup. This PR address this defect.

Fixes dotnet#38465
@pranavkm pranavkm requested a review from javiercn as a code owner January 19, 2022 21:51
@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Jan 19, 2022
@ghost ghost added this to the 6.0.x milestone Jan 19, 2022
@ghost
Copy link

ghost commented Jan 19, 2022

Hi @pranavkm. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@pranavkm
Copy link
Contributor Author

Porting #39381 to release/6.0

@pranavkm pranavkm requested a review from a team January 19, 2022 21:57
@mkArtakMSFT mkArtakMSFT added the Servicing-consider Shiproom approval is required for the issue label Jan 19, 2022
@ghost
Copy link

ghost commented Jan 19, 2022

Hi @pranavkm. 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.

Copy link
Contributor

@TanayParikh TanayParikh left a comment

Choose a reason for hiding this comment

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

Approving Backport

@leecow leecow added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Jan 20, 2022
@leecow leecow modified the milestones: 6.0.x, 6.0.3 Jan 20, 2022
@pranavkm
Copy link
Contributor Author

@dotnet/aspnet-build could we get this merged?

@dougbu
Copy link
Contributor

dougbu commented Jan 22, 2022

@pranavkm this is approved for 6.0.3 and branches aren't open for that version yet.

@wtgodbe wtgodbe merged commit 1d3434a into dotnet:release/6.0 Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants