website/blog/2023-01-16_v0.22.mdx
import Label from '@site/src/ui/typography/Label'; import Image from '@site/src/components/Image';
It's the first release of the year, and with this release, we're landing some quality of life infrastructure and workflow improvements!
<!--truncate-->When running targets, we generate a graph of actions to execute in order within the action runner. An action is one of "setup toolchain", "install dependencies", "run target", so on and so forth. Our action runner would then spawn threads for every action using the Tokio runtime. While this worked great, concurrency was entirely abstracted away from us.
To mitigate this problem, we've implemented a new system for executing actions known as the action
pipeline (or simply pipeline), which implements a dynamically scaling thread pool on top of Tokio.
This provides us with more control over concurrency, starting with the new --concurrency option,
which restricts the number of threads (or CPU cores).
$ moon run :build --concurrency 2
When we run targets in the pipeline, we hash a collection of inputs to calculate whether to continue running or to exit early. This functionality has been extremely beneficial for optimizing the pipeline, and so, we've expanded the hasher for other use cases. To start, the following 2 workflows now utilize the hasher:
npm install, etc), we now hash all production,
development, and peer dependencies from applicable manifests (package.json). This has resulted
in more accurate installs, as we're no longer inadvertently installing when a non-dependency field
is modified in a manifest. On top of this, will still take into account lockfile modified
timestamps.Because of the hashing improvements above, we're now able to cache the entirety of the project graph
into local cache. Depending on how many projects are in your workspace, you may see performance
improvements on subsequent runs as we're no longer re-building the project graph over and over
everytime the moon binary is ran.
Turborepo is a popular task runner for Node.js based monorepos, but doesn't support all the
functionality that moon does. If you're looking to prototype moon, or migrate from Turborepo to moon
holistically, we now support a new command moon migrate from-turborepo.
This command will migrate the turbo.json file to moon applicable configuration files!
$ moon migrate from-turborepo
Because of the runner -> pipeline changes above, the runner.* webhook
events were renamed to pipeline.*.
Renamed the --upstream option to --remote, to better align with Git terminology, and removed the
--report option from moon check and moon run commands. Reports are now always created.
View the official release for a full list of changes.
versionConstraint setting in
.moon/workspace.yml that enforces a requirement on the running moon binary.project fields in moon.yml to be optional,
excluding description.Expect the following in the v0.23 release!
outputs.