Skip to content

Conversation

@pranavkm
Copy link
Contributor

@pranavkm pranavkm commented Jul 2, 2021

…hot reload

Fixes #33477

@Pilchie Pilchie added the area-blazor Includes: Blazor, Razor Components label Jul 2, 2021
@pranavkm pranavkm force-pushed the prkrishn/metadata-update branch from 70d6f43 to 5073e12 Compare July 7, 2021 00:13
@pranavkm pranavkm marked this pull request as ready for review July 7, 2021 16:41
@pranavkm pranavkm requested review from a team and javiercn as code owners July 7, 2021 16:41
@pranavkm pranavkm added the api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews label Jul 7, 2021
@ghost
Copy link

ghost commented Jul 7, 2021

Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:

  • The PR contains changes to the reference-assembly that describe the API change. Or, you have included a snippet of reference-assembly-style code that illustrates the API change.
  • The PR describes the impact to users, both positive (useful new APIs) and negative (breaking changes).
  • Someone is assigned to "champion" this change in the meeting, and they understand the impact and design of the change.

@pranavkm pranavkm force-pushed the prkrishn/metadata-update branch 3 times, most recently from 3537559 to 798af0f Compare July 7, 2021 16:56
@pranavkm pranavkm force-pushed the prkrishn/metadata-update branch from 798af0f to be8318c Compare July 9, 2021 16:45
Microsoft.AspNetCore.Components.NavigationOptions.ReplaceHistoryEntry.get -> bool
Microsoft.AspNetCore.Components.NavigationOptions.ReplaceHistoryEntry.init -> void
Microsoft.AspNetCore.Components.RenderHandle.IsHotReloading.get -> bool
Microsoft.AspNetCore.Components.RenderHandle.IsRenderingOnMetadataUpdate.get -> bool
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The runtime is using MetadataUpdate as the term for hot reload. Updated this API to use this nomenclature. Outside of this, this PR is fairly simple - it uses the new API and adds a test hook for code that currently relies on testing. Once the SDK change - dotnet/sdk#18810 lands, we're able to trim out all[1] references to hot reload specific code.

[1] Right now the test type with the property set to default ends up not being trimmed. But it seems like a small cost and I'll follow up to see if we can clear that up. I wouldn't block on it though.

@pranavkm
Copy link
Contributor Author

pranavkm commented Jul 9, 2021

Could I have this reviewed? It's an easy one.

@pranavkm pranavkm enabled auto-merge (squash) July 11, 2021 04:13
@pranavkm pranavkm merged commit 39dccd7 into main Jul 11, 2021
@pranavkm pranavkm deleted the prkrishn/metadata-update branch July 11, 2021 05:36
@ghost ghost added this to the 6.0-preview7 milestone Jul 11, 2021
@pranavkm pranavkm added api-approved API was approved in API review, it can be implemented and removed api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews labels Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-approved API was approved in API review, it can be implemented area-blazor Includes: Blazor, Razor Components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update code in ASP.NET Core that detect if the app is being hot reloaded

4 participants