Skip to content

Invalidate HMR data on errors#59854

Closed
crisbeto wants to merge 2 commits intoangular:mainfrom
crisbeto:hmr-try-catch
Closed

Invalidate HMR data on errors#59854
crisbeto wants to merge 2 commits intoangular:mainfrom
crisbeto:hmr-try-catch

Conversation

@crisbeto
Copy link
Copy Markdown
Member

@crisbeto crisbeto commented Feb 5, 2025

Includes the following changes:

refactor(compiler): pass more information to HMR replacement function

Adjusts the code we generate for HMR so that it passes in the HMR ID and import.meta to the replaceMetadata call. This is necessary so we can do better logging of errors.

fix(core): invalidate HMR component if replacement throws an error

Integrates angular/angular-cli#29510 which allows us to invalidate the data in the dev server for a component if a replacement threw an error.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Feb 5, 2025
@crisbeto crisbeto requested a review from clydin February 5, 2025 13:03
@angular-robot angular-robot bot added area: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime labels Feb 5, 2025
@ngbot ngbot bot added this to the Backlog milestone Feb 5, 2025
@crisbeto crisbeto force-pushed the hmr-try-catch branch 20 times, most recently from 820e9a5 to 5540198 Compare February 6, 2025 21:52
Adjusts the code we generate for HMR so that it passes in the HMR ID and `import.meta` to the `replaceMetadata` call. This is necessary so we can do better logging of errors.
Integrates angular/angular-cli#29510 which allows us to invalidate the data in the dev server for a component if a replacement threw an error.
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 11, 2025
atscott pushed a commit that referenced this pull request Feb 12, 2025
…#59854)

Adjusts the code we generate for HMR so that it passes in the HMR ID and `import.meta` to the `replaceMetadata` call. This is necessary so we can do better logging of errors.

PR Close #59854
atscott pushed a commit that referenced this pull request Feb 12, 2025
…59854)

Integrates angular/angular-cli#29510 which allows us to invalidate the data in the dev server for a component if a replacement threw an error.

PR Close #59854
@atscott
Copy link
Copy Markdown
Contributor

atscott commented Feb 12, 2025

This PR was merged into the repository by commit b0266bd.

The changes were merged into the following branches: main, 19.1.x

@atscott atscott closed this in e47c1e5 Feb 12, 2025
atscott pushed a commit that referenced this pull request Feb 12, 2025
…59854)

Integrates angular/angular-cli#29510 which allows us to invalidate the data in the dev server for a component if a replacement threw an error.

PR Close #59854
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants