Skip to content

Conversation

@tmat
Copy link
Member

@tmat tmat commented Aug 5, 2025

Emits field private static Action<HotReloadException> Created to synthesized HotReloadException type and adds Created?.Invoke(this) to its constructor.

This allows Hot Reload agent injected in the application process to hook up a handler that notifies the host when a runtime rude edit occurs.
The host may decide to restart the application at that point (HotReloadAutoRestart setting is on).

Contributes to dotnet/sdk#48515.

@tmat tmat force-pushed the HRECreated branch 2 times, most recently from 8cd8591 to 4b4910b Compare August 6, 2025 22:39
@tmat tmat force-pushed the HRECreated branch 2 times, most recently from b718dca to cc0f523 Compare August 29, 2025 22:02
@tmat tmat marked this pull request as ready for review August 29, 2025 22:02
@tmat tmat requested a review from a team as a code owner August 29, 2025 22:02
@tmat
Copy link
Member Author

tmat commented Aug 29, 2025

@dotnet/roslyn-compiler ptal

@AlekseyTs
Copy link
Contributor

AlekseyTs commented Sep 16, 2025

Done with review pass (commit 2) #Closed

@jcouv jcouv self-assigned this Sep 22, 2025
new SynthesizedHotReloadExceptionConstructorSymbol(this, stringType, intType),
new SynthesizedFieldSymbol(this, intType, CodeFieldName, DeclarationModifiers.Public, isReadOnly: true, isStatic: false)
new SynthesizedFieldSymbol(this, intType, CodeFieldName, DeclarationModifiers.Public, isReadOnly: true, isStatic: false),
new SynthesizedFieldSymbol(this, actionOfTType.Construct(exceptionType), CreatedActionFieldName, DeclarationModifiers.Private, isReadOnly: false, isStatic: true)
Copy link
Member

@jcouv jcouv Sep 22, 2025

Choose a reason for hiding this comment

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

actionOfTType.Construct(exceptionType), CreatedActionFieldName

Is it intentional that we don't care about constraints (in a scenario with a custom Action type)? We generally check constraints whenever we construct symbols, but we may have an exception for types that are expected to be defined in the BCL (in System namespace) where we may make certain assumptions. I'm not sure

Copy link
Member

Choose a reason for hiding this comment

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

Discussed offline

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

Done with review pass (commit 3)

Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

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

LGTM (commit 3)

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (commit 3)

@tmat tmat merged commit 42cb8be into dotnet:main Sep 24, 2025
24 checks passed
@tmat tmat deleted the HRECreated branch September 24, 2025 23:38
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Sep 24, 2025
@tmat
Copy link
Member Author

tmat commented Sep 25, 2025

/backport to release/dev18.0

@github-actions
Copy link
Contributor

Started backporting to release/dev18.0: https://github.com/dotnet/roslyn/actions/runs/18015545762

phil-allen-msft added a commit that referenced this pull request Sep 30, 2025
…ception constructor (#80463)

Backport of #79790 to release/dev18.0

/cc @tmat

## Customer Impact

## Regression

- [ ] Yes
- [x] No

[If yes, specify when the regression was introduced. Provide the PR or
commit if known.]

## Testing

[How was the fix verified? How was the issue missed previously? What
tests were added?]

## Risk

[High/Medium/Low. Justify the indication by mentioning how risks were
measured and addressed.]
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