Skip to content

fix(ivy): recompile component when template changes in ngc watch mode - #33551

Closed
JoostK wants to merge 2 commits into
angular:masterfrom
JoostK:ngc-ivy-template-change
Closed

JoostK wants to merge 2 commits into
angular:masterfrom
JoostK:ngc-ivy-template-change

Conversation

@JoostK

@JoostK JoostK commented Nov 2, 2019

Copy link
Copy Markdown
Member

When the Angular compiler is operated through the ngc binary in watch
mode, changing a template in an external file would not cause the
component to be recompiled if Ivy is enabled.

There was a problem with how a cached compiler host was present that was
unaware of the changed resources, therefore failing to trigger a
recompilation of a component whenever its template changes. This commit
fixes the issue by ensuring that information about modified resources is
correctly available to the cached compiler host.

Fixes #32869

@JoostK JoostK added type: bug/fix action: review The PR is still awaiting reviews from at least one requested reviewer effort1: hours workaround1: obvious freq3: high severity3: broken target: patch This PR is targeted for the next patch release risk: low area: compiler Issues related to `ngc`, Angular's template compiler labels Nov 2, 2019
@ngbot ngbot Bot modified the milestone: Backlog Nov 2, 2019
@JoostK
JoostK marked this pull request as ready for review November 2, 2019 23:50
@JoostK
JoostK requested a review from a team November 2, 2019 23:50
@alxhub

alxhub commented Nov 6, 2019

Copy link
Copy Markdown
Member

Presubmit
No Ivy presubmit needed - this logic is not invoked in g3.

@alxhub alxhub 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 6, 2019
atscott pushed a commit that referenced this pull request Nov 7, 2019
…#33551)

When the Angular compiler is operated through the ngc binary in watch
mode, changing a template in an external file would not cause the
component to be recompiled if Ivy is enabled.

There was a problem with how a cached compiler host was present that was
unaware of the changed resources, therefore failing to trigger a
recompilation of a component whenever its template changes. This commit
fixes the issue by ensuring that information about modified resources is
correctly available to the cached compiler host.

Fixes #32869

PR Close #33551
@atscott atscott closed this in 8912b11 Nov 7, 2019
atscott added a commit to atscott/angular that referenced this pull request Nov 7, 2019
atscott added a commit that referenced this pull request Nov 7, 2019
atscott added a commit that referenced this pull request Nov 7, 2019
@JoostK JoostK reopened this Nov 7, 2019
@JoostK JoostK added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Nov 7, 2019
When the Angular compiler is operated through the ngc binary in watch
mode, changing a template in an external file would not cause the
component to be recompiled if Ivy is enabled.

There was a problem with how a cached compiler host was present that was
unaware of the changed resources, therefore failing to trigger a
recompilation of a component whenever its template changes. This commit
fixes the issue by ensuring that information about modified resources is
correctly available to the cached compiler host.

Fixes angular#32869
@JoostK
JoostK force-pushed the ngc-ivy-template-change branch from 6ab2c38 to af66ff4 Compare November 9, 2019 15:58
@JoostK
JoostK requested a review from a team November 9, 2019 15:58
@JoostK

JoostK commented Nov 9, 2019 •

Copy link
Copy Markdown
Member Author

Windows tests are now passing (https://app.circleci.com/jobs/github/angular/angular/521648) after having enabled Windows tests in this commit, which I have since removed from the PR.

@JoostK
JoostK force-pushed the ngc-ivy-template-change branch from af66ff4 to b4e9bb3 Compare November 9, 2019 18:07
@JoostK JoostK added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Nov 9, 2019
@kara kara added the action: presubmit The PR is in need of a google3 presubmit label Nov 11, 2019
@kara

kara commented Nov 12, 2019

Copy link
Copy Markdown
Contributor

VE presubmit

Ivy presubmit

@kara kara removed the action: presubmit The PR is in need of a google3 presubmit label Nov 12, 2019
kara pushed a commit that referenced this pull request Nov 12, 2019
…#33551)

When the Angular compiler is operated through the ngc binary in watch
mode, changing a template in an external file would not cause the
component to be recompiled if Ivy is enabled.

There was a problem with how a cached compiler host was present that was
unaware of the changed resources, therefore failing to trigger a
recompilation of a component whenever its template changes. This commit
fixes the issue by ensuring that information about modified resources is
correctly available to the cached compiler host.

Fixes #32869

PR Close #33551
@kara kara closed this in 6899ee5 Nov 12, 2019
@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 13, 2019
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 cla: yes effort1: hours freq3: high risk: low target: patch This PR is targeted for the next patch release type: bug/fix workaround1: obvious

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ngc --watch ignores changes in templates (ivy, 9.0.0-next.8)

4 participants