-
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add blog post and update docs. (#1035)
* Rework query tasks affected. * Add proto purge. * Finish proto docs. * Finish moon docs. * Fix test.
- Loading branch information
Showing
12 changed files
with
264 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
slug: proto-v0.16 | ||
title: proto v0.16 - Add, remove, and purge plugins | ||
authors: [milesj] | ||
tags: [proto, plugin] | ||
--- | ||
|
||
This release adds functionality for managing plugins and purging the proto store. | ||
|
||
<!--truncate--> | ||
|
||
## Add and remove plugins | ||
|
||
Now that proto has fully embraced a plugin based architecture, we thought it'd be nice to support | ||
the management of these plugins through the CLI. This release adds two new commands: | ||
[`proto add-plugin`](/docs/proto/commands/add-plugin) and | ||
[`proto remove-plugin`](/docs/proto/commands/remove-plugin). | ||
|
||
Adding a plugin requires a unique ID and what we call a locator, which is a string that dictates | ||
where to locate and download the plugin from. Here's an example for Node.js, but this isn't | ||
necessary as it's built-in: | ||
|
||
```shell | ||
$ proto add-plugin node source:https://github.com/moonrepo/node-plugin/releases/latest/download/node_plugin.wasm | ||
``` | ||
|
||
Additionally, removing a plugin is even easier. | ||
|
||
```shell | ||
$ proto remove-plugin node | ||
``` | ||
|
||
## Purge tools and plugins | ||
|
||
proto has supported cleaning for quite some time through the | ||
[`proto clean`](/docs/proto/commands/clean) command (and the | ||
[`auto-clean` setting](/docs/proto/config#user-configuration)), which would automatically delete | ||
installed tool versions and temporary files that are older then a specific timeframe. This helps to | ||
free up disk space for unused or rarely used tools. | ||
|
||
In this release, we're expanding the `clean` command's functionality with a concept known as | ||
purging, which will "delete entirely". The first being the new `--purge` option, which will delete a | ||
tool, its manifest, _all_ installed versions, and the entire `~/.proto/tools/<id>` directory. | ||
|
||
```shell | ||
# Delete all traces of Node.js | ||
$ proto clean --purge node | ||
``` | ||
|
||
Additionaly, a new `--purge-plugins` option can be used to delete all downloaded plugins (the | ||
`~/.proto/plugins` directory). Useful for house keeping or if you want to start fresh. | ||
|
||
```shell | ||
$ proto clean --purge-plugins | ||
``` | ||
|
||
## Other changes | ||
|
||
View the [official release](https://github.com/moonrepo/proto/releases/tag/v0.16.0) for a full list | ||
of changes. | ||
|
||
- Added folder locking during tool installation to avoid colliding processes. | ||
- Renamed `PROTO_ROOT` to `PROTO_HOME`, but we'll support `PROTO_ROOT` for the time being. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
--- | ||
slug: moon-v1.13 | ||
title: moon v1.13 - Toolchain now uses WASM plugins | ||
authors: [milesj] | ||
tags: [tasks, proto, wasm] | ||
image: ./img/moon/v1.13.png | ||
--- | ||
|
||
This is a light release that focused primarily on upgrading to the WASM based proto implementation. | ||
|
||
<!--truncate--> | ||
|
||
## proto upgrade and WASM plugins | ||
|
||
Over the last few months, we've made immense strides on [proto](/proto), our multi-language | ||
toolchain. For those of you unaware, moon's toolchain is built on top of proto, and we accomplish | ||
this by utilizing the same Rust code between both tools. | ||
|
||
However, moon has been locked to [proto v0.12](/blog/proto-v0.12), which was a purely Rust based | ||
implementation. With the release of [proto v0.13](/blog/proto-v0.13) and onward, proto has moved to | ||
a WASM based plugin architecture (with the core still in Rust), which allows us to support more | ||
languages, and enables developers to write plugins in non-Rust languages. | ||
|
||
And since our WASM plugins have stabilized by [proto v0.16](/blog/proto-v0.16), we felt it was time | ||
to finally upgrade moon's implementation to the latest and greatest. So what does this mean exactly? | ||
A few things: | ||
|
||
- If you're using moon's [toolchain](/docs/config/toolchain) (like `node`), we will now download the | ||
[Node.js WASM plugins](https://github.com/moonrepo/node-plugin) in the background (to | ||
`~/.proto/plugins`). | ||
- These plugins are in charge of downloading and installing the Node.js, npm, pnpm, or yarn version | ||
specified in your toolchain configuration. | ||
- The entire plugin flow is now logged to the console, so you can see what's happening behind the | ||
scenes. | ||
- In the future (most likely moon v2), our platform and language integration will also be powered by | ||
WASM plugins. This enables you to build your own custom plugins! | ||
|
||
:::info | ||
|
||
This entire process should be transparent to all users, and you should not notice any changes. | ||
However, in case this upgrade causes issues, we wanted to isolate it from other changes, hence the | ||
light release! | ||
|
||
::: | ||
|
||
## Allow tasks to fail | ||
|
||
"Allow tasks to fail?" You ask yourself. "Doesn't that defeat the point of a task runner?" You | ||
question further. "You're not wrong!" We reply. These questions assume a perfect repository state, | ||
where all tasks either pass or fail, and there's no middle ground. In reality, very rarely is that | ||
true, and we want to support those stuck in the middle, such as: | ||
|
||
- In a heavy migration and it's known that a task is currently broken. | ||
- The task is flaky but you've been unable to find the root cause. | ||
- Upstream dependencies have published a backwards incompatible change, and you're waiting on a fix. | ||
- And of course, in the middle of adopting moon! | ||
|
||
For situations where a task consistently or sometimes fails, but you don't want it to fail the | ||
entire pipeline (especially in CI), you can enable the new | ||
[`allowFailure` task option](/docs/config/project#allowfailure). | ||
|
||
```yaml title="moon.yml" | ||
tasks: | ||
typecheck: | ||
command: 'tsc --build' | ||
options: | ||
allowFailure: true | ||
``` | ||
|
||
When enabled, failing tasks will no longer bail [`moon run`](/docs/commands/run) early, nor will it | ||
exit [`moon ci`](/docs/commands/ci) with a non-zero exit code. However, we still built guard rails | ||
around this feature, as we don't want to encourage bad practices, and one of these guard rails is | ||
that tasks that enable `allowFailure` _cannot_ be depended on by other tasks, as we cannot guarantee | ||
that it's side-effect free. | ||
|
||
## Other changes | ||
|
||
View the [official release](https://github.com/moonrepo/moon/releases/tag/v1.13.0) for a full list | ||
of changes. | ||
|
||
- Added colors to command line `--help` menus. | ||
- Updated `runner.archivableTargets` to support tag scoped targets. | ||
- Updated `moon query tasks --affected` to filter based on affected task, instead of affected | ||
project. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.