Skip to content

fix(@angular-devkit/build-webpack): emit result when webpack is closed #21428

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

Merged
merged 1 commit into from
Jul 27, 2021
Merged

fix(@angular-devkit/build-webpack): emit result when webpack is closed #21428

merged 1 commit into from
Jul 27, 2021

Conversation

alan-agius4
Copy link
Collaborator

With this change we emit the compilation result when the compilation is closed, when the compilation is not in watch mode.

This is needed so that when persistent caching is enabled and architect promise API is used (.result) instead of .output we wait for the cache to be written prior to terminating the process/resolving the result promise.

The result API currently, takes the first emit

get result() {
return output.pipe(first()).toPromise();
},

Closes #21419

With this change we emit the compilation result when the compilation is closed, when the compilation is not in watch mode.

This is needed so that when persistent caching is enabled and architect promise API is used (`.result`) instead of `.output` we wait for the cache to be written prior to terminating the process/resolving the result promise.

The `result` API currently, takes the first emit https://github.com/angular/angular-cli/blob/4f9df9f4a4da81c9ecd8733204226c030f8f7d56/packages/angular_devkit/architect/src/schedule-by-name.ts#L118-L120

Closes #21419
@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Jul 27, 2021
@alan-agius4 alan-agius4 requested a review from clydin July 27, 2021 14:02
@google-cla google-cla bot added the cla: yes label Jul 27, 2021
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Jul 27, 2021
@clydin clydin merged commit 6153530 into angular:master Jul 27, 2021
@alan-agius4 alan-agius4 deleted the build-webpack branch July 27, 2021 16:19
@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 Aug 27, 2021
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 target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't make NG_PERSISTENT_BUILD_CACHE work
2 participants