`build-angular:application` + `ng serve` doesn't update components, that were removed and then readded
sod opened this issue · 1 comments
Command
serve
Is this a regression?
Don't know
Description
If you switch your branch twice, essentially undoing any changes done and then reapplying what you've done, then ng serve
with the new build-angular:application
builder won't notice any further changes in components that you added in your branch.
Reproduction (https://github.com/sod/issue-forgetting):
Setup
# checkout branches `main` and `added-content`
git clone git@github.com:sod/issue-forgetting.git
cd issue-forgetting
git checkout -b added-content origin/added-content
# install dependencies
yarn install
# start angular
ng serve
On http://localhost:4200/ you should see this output.
If you do a change in component-1
it'll change accordingly.
Now to the actual reproduction / trigger the bug:
While ng serve
is running:
git checkout main
wait a second, then:
git checkout added-content
You'll correctly see component-1 works!
and component-2 works!
again, as you are back on branch added-content
.
But now in your editor of choice do any change in the component-1.component.ts
file and the ng serve
watcher doesn't do anything. You'll have to restart ng serve
to continue working.
Components not touched by the branch change still update though. Just components that disappear and then reappear seem to get left out.
Video of reproduction:
CleanShot.2024-05-08.at.17.23.24.mp4
Your Environment
Angular CLI: 17.3.7
Node: 20.11.1
Package Manager: yarn 1.22.19
OS: darwin arm64
Angular: 17.3.7
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1703.7
@angular-devkit/build-angular 17.3.7
@angular-devkit/core 17.3.7
@angular-devkit/schematics 17.3.7
@schematics/angular 17.3.7
rxjs 7.8.1
typescript 5.4.5
zone.js 0.14.5