ADR #1: Changing prepare step to support execution order
#21
SavelevMatthew
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
The current step
preparejust simply doesn't close the needs.It was designed to build packages that will be published. The problem is that after mono-pub sets the actual versions of packages and their dependencies in package.json (in case versions are used in bundles), replacing “workspace” with “x.y.z” format, then some popular build tools (like turborepo), lose dependency information when building the execution graph. This breaks the build order and leads to build errors. The current
preparestep gives only a flat list of all found packages, which is not enough to perform the operations.Suggested solutions
It is wise to split the
preparestep into 2 options:prepareAllandprepareSingle.prepareSinglewill be for those cases where the mono repository does not have an orchestration tool, allowing the user to run the Build script for an individual package one by one. The order of execution will be guaranteed by the mono-pub.prepareAllwill be the successor to prepare and is intended to optimize build speed. It will provide extended information about packages and their dependencies, allowing plugins to decide how packages should be built. In addition toprepareAll, it is proposed to implement and provide several utilities that will use this information to break packages into groups that can be built in parallel, optimizing resource utilizationNegative Consequences:
Positive consequences:
Beta Was this translation helpful? Give feedback.
All reactions