Skip to content

fix(compiler-cli): account for multiple generated namespace imports in HMR#58924

Closed
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:58915/hmr-multiple-namespaces
Closed

fix(compiler-cli): account for multiple generated namespace imports in HMR#58924
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:58915/hmr-multiple-namespaces

Conversation

@crisbeto
Copy link
Copy Markdown
Member

The current HMR compiler assumes that there will only be one namespace import in the generated code (@angular/core). This is incorrect, because the compiler may need to generate additional imports in some cases (e.g. importing directives through a module). These changes adjust the compiler to capture all the namespaces in an array and pass them along.

Fixes #58915.

@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 Nov 27, 2024
@crisbeto crisbeto requested a review from clydin November 27, 2024 10:49
@crisbeto crisbeto force-pushed the 58915/hmr-multiple-namespaces branch from eb1cc91 to 6175b44 Compare November 27, 2024 15:11
@crisbeto
Copy link
Copy Markdown
Member Author

👍 feedback has been addressed.

@pkozlowski-opensource pkozlowski-opensource added the area: compiler Issues related to `ngc`, Angular's template compiler label Nov 27, 2024
@ngbot ngbot bot added this to the Backlog milestone Nov 27, 2024
…n HMR

The current HMR compiler assumes that there will only be one namespace import in the generated code (`@angular/core`). This is incorrect, because the compiler may need to generate additional imports in some cases (e.g. importing directives through a module). These changes adjust the compiler to capture all the namespaces in an array and pass them along.

Fixes angular#58915.
@crisbeto crisbeto force-pushed the 58915/hmr-multiple-namespaces branch from 6175b44 to e46002d Compare November 27, 2024 15:45
@angular-robot angular-robot bot removed the area: compiler Issues related to `ngc`, Angular's template compiler label Nov 27, 2024
@ngbot ngbot bot removed this from the Backlog milestone Nov 27, 2024
@pkozlowski-opensource pkozlowski-opensource added the area: compiler Issues related to `ngc`, Angular's template compiler label Nov 27, 2024
@ngbot ngbot bot added this to the Backlog milestone Nov 27, 2024
@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 Nov 28, 2024
@pkozlowski-opensource
Copy link
Copy Markdown
Member

This PR was merged into the repository by commit f280467.

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

pkozlowski-opensource pushed a commit that referenced this pull request Nov 28, 2024
…n HMR (#58924)

The current HMR compiler assumes that there will only be one namespace import in the generated code (`@angular/core`). This is incorrect, because the compiler may need to generate additional imports in some cases (e.g. importing directives through a module). These changes adjust the compiler to capture all the namespaces in an array and pass them along.

Fixes #58915.

PR Close #58924
@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 Dec 29, 2024
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 target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Template HMR fails with two way binding (RForms, TForms)

5 participants