Release Notes
🚀 Updates
- CLI
- Added a
--update-constraintoption tomoon upgradethat will update the workspace config
version constraint to the latest version. - Updated
--loglevel handling.debugshould be used for the most part, as it includes most
debug information.tracenow includes a ton of information, which may be too spammy for normal
debugging (is meant for agents and deep diagnostics).
- Added a
- CAS
- Further improvements to the content-addressable storage (CAS) cache, including better error
handling and performance improvements. - Added a new storage API for local/remote cache interoperability. This will unlock many
improvements in the future, including better cache hit rates and more efficient storage. - When copying files to/from the CAS, we now use OS reflink's when available, which can improve
performance and reduce disk space usage. - When the local/remote cache is missing a blob, we'll attempt to retrieve it from the other
cache, which can improve cache hit rates in some scenarios. - When a remote cache hit, we'll now warm the local cache with the hydrated manifest and its
blobs, so the next run resolves locally instead of round-tripping to the remote.
- Further improvements to the content-addressable storage (CAS) cache, including better error
- Daemon
- Server log files will now rotate up to 7 times. Older log files will be automatically deleted.
- Webhook delivery and task output archiving are now acknowledged immediately and run in the
background on the daemon, so a client exiting or hitting a deadline no longer cancels the work
mid-flight. - The daemon now takes exclusive ownership of its workspace through an advisory file lock held for
its entire lifetime, replacing PID-liveness checks that could be fooled by zombie processes,
reused PIDs, or processes owned by another user. A crashed daemon releases the lock
automatically, so a stale socket or state file can no longer block or misdirect the next start. - Whether the daemon is running is now determined by connecting to it rather than probing a PID,
and its metadata is recorded in adaemon.jsonstate file (replacingmoond.pid). - Connecting to the daemon and starting it are now a single operation, so a command that needs the
daemon will start one itself if the background pre-warm hasn't yet, instead of silently running
without it. Concurrent starts still coordinate so only one daemon is spawned. - When connecting, the client now checks the running daemon's moon and protocol version against
its own and, on a mismatch, restarts it — so a daemon left over from before amoon upgradeis
replaced instead of serving the old binary indefinitely. - The daemon now retires itself after a long idle period (no requests), and exits immediately if
its workspace is deleted, so an abandoned workspace no longer leaves a daemon running forever.
- Processes
- Improved our "stream and capture output" child process handling to operate on bytes instead of
lines, which should resolve some edge cases with output not being written to the console, or
being written out of order.
- Improved our "stream and capture output" child process handling to operate on bytes instead of
- Remote cache
- Added compression support for streamed read/writes of blobs (large files).
- Added extensive testing to account for edge cases.
- When the server doesn't support the configured compression, it will now default to "identity"
(uncompressed) instead of disabling the cache entirely.
- Tasks
- Added a
checkssetting to tasks that allows you to define shell scripts that execute before
the task runs, and depending on their type, different outcomes can be achieved. The following
types are supported:fingerprint- if the check fails, the task will fail and not run, otherwise the process
output will be included in the task hash.requirement— if the check fails, the task will fail and not run.condition- if all conditions pass, the task will be skipped, otherwise it will run as
normal.
- Added a
mergeChecksoption to tasks to control the merge behavior of checks when extending
tasks. - Added a top-level
taskOptionssetting tomoon.*that allows you to configure default task
options for all tasks within the current project, which can be overridden per task.
- Added a
- Toolchains
- Added caching around executable location lookups to improve performance. Previously, these were
running over and over again for each task.
- Added caching around executable location lookups to improve performance. Previously, these were
- VCS
- Hardened all executed Git commands: revisions are validated against argument injection,
credential prompts now fail immediately instead of hanging, and the fsmonitor daemon is now
disabled to avoid it blocking process pipes. - Reworked merge base resolution to be more accurate and performant. The most recent divergence
point is now preferred when local and remote branches are out of sync, and a warning is now
logged when a merge base could not be resolved, as diffs may be inaccurate without one. - Reworked how renames are handled. When diffing between revisions, the old path is now reported
as "deleted" and the new path as "added", instead of both being "modified". For statuses, the
old path is now reported as "deleted", instead of being omitted entirely. Additionally, type
changes and unmerged files are now reported, instead of being omitted.
- Hardened all executed Git commands: revisions are validated against argument injection,
🧰 Toolchains
- Python
- Added Poetry package manager support.
- Can be enabled with
unstable_python.packageManager: 'poetry'in.moon/toolchains.*. - Can be configured with
unstable_poetry.*settings in.moon/toolchains.*. - Supports tiers 1-3.
- Can be enabled with
- Added Poetry package manager support.
- Ruby
- Added unstable Ruby toolchain support!
- Can be configured with
unstable_ruby.*settings in.moon/toolchains.*. - Supports tiers 1-3. Tier 3 requires building from source (which may not be desirable).
- Will use Bundler as the package manager.
- Can be configured with
- Added unstable Ruby toolchain support!
🐞 Fixes
- CLI
- Fixed an issue where moon would silently exit with code 141 (SIGPIPE) when a child process
exited before consuming its stdin. Broken pipes are now handled explicitly instead of resetting
the SIGPIPE disposition, while piping moon's output to a consumer that closes early still exits
quietly with the conventional code.
- Fixed an issue where moon would silently exit with code 141 (SIGPIPE) when a child process
- Daemon
- Fixed an issue where every daemon RPC was capped by a 1 second client-side timeout, causing slow
procedures (webhook delivery, cache cleaning) to be cancelled even though the daemon was
healthy. Connection establishment is now bounded separately, and each procedure has an
appropriate deadline that is also enforced by the server. - Fixed an issue where connecting to the daemon while it was still starting up — or being started
by another process — would fail immediately with "connection refused", and the run would
continue without the daemon. Connection attempts are now retried with a bounded backoff. - Fixed an issue on Windows where the daemon briefly had no listening pipe instance between client
connections, causing sporadic connection failures, and where busy pipe instances were not
retried.
- Fixed an issue where every daemon RPC was capped by a 1 second client-side timeout, causing slow
- VCS
- Fixed an issue where an explicit head revision was ignored when diffing between revisions, and
the current working tree was compared against instead. - Fixed an issue where diffing against the previous revision would fail in repositories with a
single commit. - Fixed an issue where file names with spaces or special characters were excluded from file tree
results. - Fixed an issue where Git submodules added between 2 revisions were not included when diffing.
- Fixed an issue where Git hooks could not be set up from the primary working tree when other
worktrees exist. - Fixed an issue where moon would take over a hooks directory managed by another tool (husky,
lefthook, etc) whencore.hooksPathwas already configured, overwriting its hook files, and
deleting the entire directory when hooks were disabled. - Fixed an issue where Windows hook wrappers would not forward arguments containing spaces
correctly, and would arbitrarily cap forwarding at 5 arguments. - Fixed an issue where PowerShell hooks would mangle user variables that start with
$ARG, like
$ARGS.
- Fixed an issue where an explicit head revision was ignored when diffing between revisions, and
⚙️ Internal
- Updated proto to v0.58.2 from 0.57.4.
- Updated dependencies.
Install moon_cli 2.4.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/moonrepo/moon/releases/download/v2.4.0/moon_cli-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/moonrepo/moon/releases/download/v2.4.0/moon_cli-installer.ps1 | iex"Download moon_cli 2.4.0
| File | Platform | Checksum |
|---|---|---|
| moon_cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| moon_cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| moon_cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| moon_cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
| moon_cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
| moon_cli-aarch64-unknown-linux-musl.tar.xz | ARM64 MUSL Linux | checksum |
| moon_cli-x86_64-unknown-linux-musl.tar.xz | x64 MUSL Linux | checksum |