Some packages may didn't built after run build.js if the number of the cpus is less than the number of packages
Version
3.2.0-beta.2
Reproduction link
https://github.com/vuejs/vue-next
Steps to reproduce
- download the code of vue-next
- npm run build
What is expected?
Check packages, all packages which are not private or have build options have been built.
What is actually happening?
Check packages, some of them may didn't built if your number of the cpus is less than the number of packages.
In my machine which has 12 cpus, package vue
and package vue-compat
was not built.
- The package
sfc-playground
could not be successfully build now. - The build script will run the packages build in parallel(see also here) and the max concurrency is the number of cpu.
- Will stop add new task if any of the build tasks is failed.
- On my computer with 12 cpus, the
vue
andvue-compat
are the last 2 build tasks of total 14 tasks. The failed build ofsfc-playground
stoped the build procedure, so the dists ofvue
andvue-compat
are not generated.
Considering the sfc-playground
package is built using vite with the script build-sfc-playground
, I think we can simply remove the build of sfc-playground
from build tasks by removing the buildOptions
in packages/sfc-playground/package.json
.
And we can also catch the errors in build script to let the build procedure continue if any of the packages build failed.