Skip to content

ng update log messages printed twice #15839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
devversion opened this issue Oct 14, 2019 · 1 comment · Fixed by #15842
Closed

ng update log messages printed twice #15839

devversion opened this issue Oct 14, 2019 · 1 comment · Fixed by #15842

Comments

@devversion
Copy link
Member

🐞 Bug report

Command

- [X] update

Is this a regression?

Yes

Description

Running ng update and assuming the migration makes changes, results in duplicate messages.

e.g.

UPDATE package.json (2594 bytes)
UPDATE src/index.html (2108 bytes)
UPDATE package.json (2594 bytes)
UPDATE src/index.html (2108 bytes)

This seems to be because of recent changes to the ng update implementation.

const lifecycleSubscription = this.workflow.lifeCycle.subscribe(event => {
if (event.kind == 'end' || event.kind == 'post-tasks-start') {
if (!error) {
// Output the logging queue, no error happened.
logs.forEach(log => this.logger.info(log));
}
}

I've added some debug messages here and it seems that both events are fired. This causes the logs to be printed twice. e.g.

Printing logs! post-tasks-start
UPDATE package.json (2594 bytes)
UPDATE src/index.html (2108 bytes)
Printing logs! end
UPDATE package.json (2594 bytes)
UPDATE src/index.html (2108 bytes)

🌍 Your Environment


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

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.900.0-next.8
@angular-devkit/build-angular      0.900.0-next.8
@angular-devkit/build-optimizer    0.900.0-next.8
@angular-devkit/build-webpack      0.900.0-next.8
@angular-devkit/core               9.0.0-next.8
@angular-devkit/schematics         9.0.0-next.8
@angular/cdk                       9.0.0-next.0
@angular/cdk-experimental          9.0.0-next.0
@angular/cli                       9.0.0-next.8
@angular/material                  9.0.0-next.0
@angular/material-examples         9.0.0-next.0-sha-b228f079e
@angular/material-experimental     9.0.0-next.0
@angular/material-moment-adapter   9.0.0-next.0
@ngtools/webpack                   9.0.0-next.8
@schematics/angular                9.0.0-next.8
@schematics/update                 0.900.0-next.8
rxjs                               6.5.3
typescript                         3.5.3
webpack                            4.41.0
@angular-automatic-lock-bot
Copy link

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 Nov 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants