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

MultiCompiler parallelism and dependencies #12671

Merged
merged 6 commits into from
Feb 14, 2021

Conversation

sokra
Copy link
Member

@sokra sokra commented Feb 13, 2021

fixes #9162

What kind of change does this PR introduce?
feature, bugfix

Did you add tests for your changes?
yes

Does this PR introduce a breaking change?
no a butfix.
dependencies is now handled in watch mode, which changes behavior a bit

What needs to be documented once your changes are merged?

  • The dependencies config option is largely undocumented
    • It is an array of names of other configs in the same array of configs. All dependencies need to be compiled before this config starts compiling.
    • In watch mode dependencies will invalidate the compiler when the dependency has changed and when a dependency is currently compiling or invalid this config will not compile until the dependency is done.
  • There is a parallelism: number option on the configuration array now
    • It specifies the maximum of compilers that will compile in parallel.
module.exports = [
  { ... },
  { ... }
];
module.exports.parallelism = 1;

@webpack-bot
Copy link
Contributor

webpack-bot commented Feb 13, 2021

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

add support for dependencies during watching
add parallelism option for MultiCompiler
@sokra sokra force-pushed the feature/multi-compiler-parallelism-dependencies branch from a3e65a0 to e7d9457 Compare February 13, 2021 20:02
@sokra sokra disabled auto-merge February 13, 2021 20:07
@alexander-akait
Copy link
Member

Fix for #9162?

@webpack-bot
Copy link
Contributor

@sokra The most important CI builds failed. This way your PR can't be merged.

Please take a look at the CI results from azure (2 errors / 6 warnings) and appveyor (success) and fix these issues.

@sokra sokra enabled auto-merge February 14, 2021 20:58
@sokra sokra merged commit ec3b1f0 into master Feb 14, 2021
@sokra sokra deleted the feature/multi-compiler-parallelism-dependencies branch February 14, 2021 22:30
@webpack-bot
Copy link
Contributor

I've created an issue to document this in webpack/webpack.js.org.

@sokra
Copy link
Member Author

sokra commented Feb 15, 2021

yes fixes #9162

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide an option to limit the number of workers for multi-config compiler
4 participants