Skip to content

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented Oct 2, 2025

This PR adds a check to ignore empty hot reload updates in the Mono runtime. This prevents unnecessary processing when ASP.NET Core sends empty updates in WebAssembly debugger scenarios where the debugger itself applies the real updates.
And also avoids assertion for receiving updates from System.Reflection.Metadata.MetadataUpdater.ApplyUpdate and from debugger even if one of them was empty.

@Copilot Copilot AI review requested due to automatic review settings October 2, 2025 18:29
Copy link
Contributor

@Copilot 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

This PR adds a check to ignore empty hot reload updates in the Mono runtime. This prevents unnecessary processing when ASP.NET Core sends empty updates in WebAssembly debugger scenarios where the debugger itself applies the real updates.

Key Changes

  • Added early return when both metadata and IL byte counts are zero
  • Prevents redundant processing of empty hot reload updates

@thaystg
Copy link
Member Author

thaystg commented Oct 2, 2025

/backport to release/10.0

Copy link
Contributor

github-actions bot commented Oct 2, 2025

Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/18202185862

@thaystg
Copy link
Member Author

thaystg commented Oct 2, 2025

/backport to release/9.0-staging

Copy link
Contributor

github-actions bot commented Oct 2, 2025

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/18202189764

@tmat
Copy link
Member

tmat commented Oct 2, 2025

Do we need a test?

@steveisok
Copy link
Member

Do we need a test?

Can we pull that off in runtime?

@thaystg
Copy link
Member Author

thaystg commented Oct 3, 2025

Can we pull that off in runtime

I think it's not possible to add a test here. Not super sure.

@thaystg thaystg merged commit 53956ab into dotnet:main Oct 3, 2025
70 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants