The toolchain is an internal layer for downloading, installing, and managing tools (languages, dependency managers, libraries, and binaries) that are required at runtime. We embrace this approach over relying on these tools "existing" in the current environment, as it ensures the following across any environment or machine:
- The version and enabled features of a tool are identical.
- Tools are isolated and unaffected by external sources.
- Builds are consistent, reproducible, and hopefully deterministic.
Furthermore, this avoids a developer, pipeline, machine, etc, having to pre-install all the necessary tools, and to keep them in sync as time passes.
How it works
The toolchain is a
.moon directory within the current user's home directory, e.g.,
The first step in a tool's life-cycle is being downloaded to
~/.moon/temp. Downloads are typically
an archive that can be unpacked into a target directory.
Once downloaded, we verify the downloaded file by running a sha256 checksum. If this check fails for any reason, the toolchain is unusable, and the process is aborted.
After a successful verification, the last step in the tool's life-cycle can begin, installation.
Depending on the type of download, the installation process may differ. For archives, we unpack the
The following tools are currently managed by the toolchain.