You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ng serve in Ivy mode is dropping directives list when editing a template #31654
You can see that directives: [_angular_material__WEBPACK_IMPORTED_MODULE_1__["MatButton"], _angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterOutlet"]] is missing from the incremental compile output.
In the incremental compilation case we are not re-compiling the app.module.ts, which has the NgModule that owns the AppComponent. This leads to missing metadata in the compilation scope of the component and so the missing directives.
We need to tweak the dependency analysis in ngtsc to ensure that app.module.ts is marked as changed if a resource of one of its source dependencies changes.
The problem with the IVY incremental builds is still broken... we are working on a fix - see #31655, which fixes it but not the correct way.
@kolkov's problem was not IVY related and was fixed in @angular-devkit/build-angular@0.802.0-rc.0 as he reports by this commit: angular/angular-cli@6649483
@petebacondarwin Ok thanks for the explanation. Please keep in mind that the 3 of us got mismatched versions as there is no warning whatsoever when you use ng update on the beta branch. Do you feel like I should open an issue or is it OK since it is only related to the beta?
Activity
petebacondarwin commentedon Jul 19, 2019
After initial compile:
After incremental compile:
You can see that
directives: [_angular_material__WEBPACK_IMPORTED_MODULE_1__["MatButton"], _angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterOutlet"]]is missing from the incremental compile output.petebacondarwin commentedon Jul 19, 2019
OK, so I think I know what is going on...
In the incremental compilation case we are not re-compiling the
app.module.ts, which has theNgModulethat owns theAppComponent. This leads to missing metadata in the compilation scope of the component and so the missing directives.We need to tweak the dependency analysis in ngtsc to ensure that
app.module.tsis marked as changed if a resource of one of its source dependencies changes.kolkov commentedon Jul 24, 2019
33 remaining items
Ploppy3 commentedon Jul 31, 2019
Also the
ng versionreport by the OP @vikerman had the same problem, mismatched versions.kolkov commentedon Jul 31, 2019
@Ploppy3 yes caused by
"@angular-devkit/build-angular": "0.802.0-next.1", this fixed in latest"@angular-devkit/build-angular": "0.802.0-rc.0",petebacondarwin commentedon Jul 31, 2019
The problem with the IVY incremental builds is still broken... we are working on a fix - see #31655, which fixes it but not the correct way.
@kolkov's problem was not IVY related and was fixed in
@angular-devkit/build-angular@0.802.0-rc.0as he reports by this commit: angular/angular-cli@6649483Ploppy3 commentedon Jul 31, 2019
@petebacondarwin Ok thanks for the explanation. Please keep in mind that the 3 of us got mismatched versions as there is no warning whatsoever when you use
ng updateon the beta branch. Do you feel like I should open an issue or is it OK since it is only related to the beta?kolkov commentedon Jul 31, 2019
Thanks!
petebacondarwin commentedon Jul 31, 2019
@Ploppy3 - yes please open an issue on the CLI repo. I think there should at least be peerDependency warnings...
fix(ivy): reuse compilation scope for incremental template changes. (a…
angular-automatic-lock-bot commentedon Sep 15, 2019
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.