Skip to content

fix(@ngtools/webpack): avoid resetting emit skipped flag when no Type… #14778

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
Jun 14, 2019
Merged

fix(@ngtools/webpack): avoid resetting emit skipped flag when no Type… #14778

merged 1 commit into from
Jun 14, 2019

Conversation

alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Jun 14, 2019

There can be a number of reason why _emitSkipped is set to true these are:

  • Errors have been encountered
  • Changes are outside of TS compilations such as HTML and CSS in JIT mode

We only want to run a full JIT emit when;

  • There hasn't been a success emit
  • When a large number of files have changed
  • First run

If a subsequent JIT build fails we shouldn't do a full emit either as we will transpile only the files that changes after the success build

if (!this._emitSkipped && this._errors.length === 0) {
this._compilerHost.resetChangedFileTracker();
}

Fixes #14775

@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release state: WIP and removed state: WIP labels Jun 14, 2019
… an emit

There can be a number of reason why `_emitSkipped` is set to true these are:
- Errors have been encountered
- Changes are outside of TS compilations such as HTML and CSS in JIT mode

We only want to run a full JIT emit when;
- There hasn't been a success emit
- When a large number of files have changed
- First run

If a subsequent JIT build fails we shouldn't do a full emit either as we will transpile only the files that changes after the success build

https://github.com/angular/angular-cli/blob/64243919c10c33775be71010efd5ae69622a728f/packages/ngtools/webpack/src/angular_compiler_plugin.ts#L1029-L1031

Fixes #14775
@alan-agius4 alan-agius4 requested a review from clydin June 14, 2019 11:27
@mgechev mgechev merged commit 9431d55 into angular:master Jun 14, 2019
@alan-agius4 alan-agius4 deleted the ngtools-webpack-emit-skipped branch June 17, 2019 18:37
@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 Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rebuild time is not stable anymore in 8.0.3
4 participants