Skip to content

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

Closed

Description

@stefanocke

This is a repost of #31982, since:

  • the bug is still there in 9.0.0-next.8 and 8.2.8 ,
  • it is reproducible (as before) with the given example and
  • it has been closed unjustified as duplicate by @alxhub.

🐞 bug report
Affected Package
The issue is caused by package @angular/compiler-cli

Is this a regression?
Yes, the previous version in which this bug was not present was: 8.1.2
(But, due to #31322, it only worked on every second change of a template.)

Description
I run ngc in watch mode. Output directory is out-tsc.
Ivy is enabled.
I change a component's template.
ngc says "File change detected. Starting incremental compilation."
However, the template change does not result in an according change in the *.js file in out-tsc directory.
For changes in *.ts files, it works.

🔬 Minimal Reproduction
Example project is at: https://github.com/stefanocke/angular-cli-app-with-rollup
Please run:

npm i
npm run ngc-app-watch

(This is nothing more than running ngc in watch mode, as the title of this bug says.)

Then, change app.component.html and look for app.component.js in tsc-out.

You will see that, although the console says correctly "File change detected. Starting incremental compilation.", nothing has changed in app.component.js.

🌍 Your Environment
Angular Version:

Angular CLI: 8.3.6
Node: 10.16.0
OS: win32 x64
Angular: 9.0.0-next.8
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, router

Package Version

@angular-devkit/architect 0.900.0-next.6
@angular-devkit/build-angular 0.900.0-next.6
@angular-devkit/build-optimizer 0.900.0-next.6
@angular-devkit/build-webpack 0.900.0-next.6
@angular-devkit/core 9.0.0-next.6
@angular-devkit/schematics 8.3.6
@angular/cli 8.3.6
@ngtools/webpack 9.0.0-next.6
@schematics/angular 8.3.6
@schematics/update 0.803.6
rxjs 6.5.2
typescript 3.5.3

Anything else relevant?
Ivy is enabled

Activity

  1. added
    area: compiler
    on Sep 26, 2019
  2. modified the milestone: needsTriage on Sep 26, 2019
  3. modified the milestones: needsTriage, Backlog on Oct 8, 2019
  4. added a commit that references this issue on Nov 7, 2019
    cd8333c
  5. 19 remaining items

  6. reopened this on Nov 16, 2019
  7. added a commit that references this issue on Feb 3, 2020
    d522f9f
  8. added a commit that references this issue on Feb 4, 2020
    a5c9cd7
  9. stefanocke commented on Feb 7, 2020

    @stefanocke
    Author

    works as expected with 9.0.0 👍

  10. angular-automatic-lock-bot commented on Mar 9, 2020

    @angular-automatic-lock-bot

    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.

  11. locked and limited conversation to collaborators on Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: compilerfreq3: highstate: has PRtype: bug/fix

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions