Skip to content
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

fix(ios): regression in incremental device builds (8_1_X) #11024

Merged
merged 6 commits into from
Jul 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion cli/lib/tasks/process-js-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ class ProcessJsTask extends IncrementalFileTask {
* we also depend on some config values from the builder this is used to
* fallback to a full task run if required.
*
* This will also dummy process the unchanged JS files again to properly
* fire expected hooks and populate the builder with required data.
*
* @return {Promise}
*/
async loadResultAndSkip() {
Expand All @@ -110,7 +113,11 @@ class ProcessJsTask extends IncrementalFileTask {
return this.doFullTaskRun();
}

Object.keys(this.data.jsFiles).forEach(relPath => this.builder.unmarkBuildDirFile(this.data.jsFiles[relPath].dest));
this.jsFiles = this.data.jsFiles;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so looking at the code, it appears we already compare hashes inside the hooks that processJsFile does, so we effectively skip the work on them anyways?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it will still skip unchanged files. It just goes through the processing flow to make sure the hooks are called and that the builder gets populated with required info about encrypted files.

this.jsBootstrapFiles.splice(0, 0, ...this.data.jsBootstrapFiles);
return Promise.all(Object.keys(this.jsFiles).map(relPath => {
return limit(() => this.processJsFile(this.jsFiles[relPath].src));
}));
}

/**
Expand Down