<!-- entire-trail-link-start -->
https://entire.io/gh/jdx/mise/trails/908
<!-- entire-trail-link-end -->
The `lint` job in CI intermittently fails in `mise run render` with an
error like this:
```
Error: ENOENT: no such file or directory, lstat '.../target/debug/deps/serde_derive-....rcgu.o'
```
([failing
run](https://github.com/jdx/mise/actions/runs/39244920002/job/118037781515))
`render:help` ran `md-magic` (markdown-magic) with its default
`**/**.md` glob, which walks the whole tree including `target/`. When a
cargo step in the same job deleted an object file mid-walk, `lstat`
threw and the job failed.
No markdown file in the repo contains a markdown-magic block, so the
step does nothing. Running `md-magic` locally reports `Files with
transforms: 0` and changes no files. This PR removes the step from
`render:help`. It also removes the `wait_for = ["render:usage"]` that
existed only so markdown-magic would not scan `docs/cli` while it was
being replaced.
`render:help` now only runs `mise render-help`. The failing job can't be
re-run until its run finishes, so CI on this PR is the check.
*AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5;
version: unavailable.*
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Build-task-only change; drops a no-op doc step and does not alter
runtime or release behavior.
>
> **Overview**
> Fixes intermittent CI failures in `mise run render` by simplifying the
**`render:help`** task.
>
> **`render:help`** now only runs `mise render-help` (README /
`cli_commands.ts` generation). The **`markdown-magic`** (`md-magic`)
step is removed because it scanned `**/**.md` across the repo (including
`target/`) and could race with Cargo deleting build artifacts, and no
repo markdown uses markdown-magic blocks anyway.
>
> The **`wait_for = ["render:usage"]`** guard is also removed; it
existed only to avoid `md-magic` walking `docs/cli` while `render:usage`
was replacing that directory.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
1b2d5b5931. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* The help-generation task now runs only the `mise` help-rendering step.
It no longer waits for the usage-rendering task or runs an additional
Markdown-processing step; the existing color setting and declared inputs
and outputs remain unchanged.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
186 lines
5.8 KiB
TOML
186 lines
5.8 KiB
TOML
#:schema ./schema/mise-task.json
|
|
|
|
[clean]
|
|
description = 'Clean build artifacts'
|
|
run = 'cargo clean'
|
|
|
|
[ci]
|
|
depends = ["format", "build", "test"]
|
|
description = "Run all CI checks"
|
|
|
|
[lint]
|
|
description = 'Run all lint checks'
|
|
depends = ['lint:*']
|
|
|
|
[build]
|
|
alias = "b"
|
|
run = "{{ get_env(name='MISE_CARGO_BUILD_COMMAND', default='cargo build') }} --all-features {{ get_env(name='MISE_CARGO_BUILD_EXTRA_ARGS', default='') }}"
|
|
run_windows = "{{ get_env(name='MISE_CARGO_BUILD_COMMAND', default='cargo build') }} {{ get_env(name='MISE_CARGO_BUILD_EXTRA_ARGS', default='') }}"
|
|
description = "Build the project"
|
|
#sources = ["Cargo.*", "src/**/*.rs"]
|
|
#outputs = ["target/debug/mise"]
|
|
|
|
[docs]
|
|
description = 'Start the documentation development server'
|
|
depends = ['docs:setup']
|
|
run = "aube run docs:dev"
|
|
|
|
["docs:setup"]
|
|
description = 'Install documentation dependencies'
|
|
run = "aube install"
|
|
|
|
["docs:build"]
|
|
description = 'Build the documentation site'
|
|
depends = ["docs:setup"]
|
|
run = "aube run docs:build"
|
|
|
|
["docs:showreel-test"]
|
|
description = 'Type-check and test the landing-page showreel'
|
|
depends = ["docs:setup"]
|
|
run = ["aube run typecheck:showreel", "aube run test:showreel"]
|
|
|
|
["docs:preview"]
|
|
description = 'Preview the documentation site'
|
|
depends = ["docs:build"]
|
|
run = "aube run docs:preview"
|
|
|
|
["docs:demos"]
|
|
description = "Create recordings with vhs"
|
|
dir = "docs"
|
|
run = """
|
|
#!/usr/bin/env bash
|
|
|
|
if ! docker info > /dev/null 2>&1; then
|
|
echo "This script uses docker, and it isn't running - please start docker and try again!"
|
|
exit 1
|
|
fi
|
|
|
|
vhs() {
|
|
docker run --rm -v $(pwd)/tapes/:/data -w /data ghcr.io/charmbracelet/vhs "$@"
|
|
}
|
|
|
|
# Create VHS recordings of all tape files in the assets directory
|
|
for i in $(ls -1 tapes/*.tape); do
|
|
vhs $(basename $i .tape).tape
|
|
done
|
|
"""
|
|
|
|
["render:usage"]
|
|
description = 'Generate usage documentation'
|
|
depends = ["build"]
|
|
env = { CLICOLOR_FORCE = "0" }
|
|
run = [
|
|
"mise usage > mise.usage.kdl",
|
|
"mise generate task-docs > tasks.md",
|
|
"rm -rf docs/cli && mkdir -p docs/cli",
|
|
"mise x usage -- usage generate markdown -m --out-dir docs/cli --url-prefix /cli --link-extension .html --html-encode --file mise.usage.kdl --replace-pre-with-code-fences",
|
|
# usage-lib renders <SUBCOMMAND> for any command with subcommands. `mise bootstrap`
|
|
# can run without a subcommand, so normalize the generated markdown.
|
|
"perl -0pi -e 's/mise bootstrap \\[FLAGS\\] <SUBCOMMAND>/mise bootstrap [FLAGS] [SUBCOMMAND]/g' docs/cli/bootstrap.md docs/cli/index.md",
|
|
"node --test docs/.vitepress/cli-reference.test.ts",
|
|
"node docs/.vitepress/cli-reference.ts",
|
|
"markdownlint --fix docs/cli",
|
|
]
|
|
|
|
["render:completions"]
|
|
description = 'Generate shell completions'
|
|
depends = ["build"]
|
|
wait_for = ["render:usage"]
|
|
env = { NO_COLOR = "1" }
|
|
run = '''
|
|
#!/usr/bin/env bash
|
|
set -xeuo pipefail
|
|
mise completion bash > completions/mise.bash
|
|
mise completion zsh > completions/_mise
|
|
mise completion fish > completions/mise.fish
|
|
mise completion powershell > completions/mise.ps1
|
|
'''
|
|
|
|
["render:mangen"]
|
|
description = 'Generate man pages'
|
|
depends = ["render:usage"]
|
|
env = { NO_COLOR = "1" }
|
|
run = [
|
|
"mise x usage -- usage generate manpage --file mise.usage.kdl > man/man1/mise.1",
|
|
# usage's manpage renderer currently includes hidden flags. Omit this temporary
|
|
# compatibility entry until it is removed alongside the alias in 2026.10.0.
|
|
'''perl -0pi -e 's/\.TP\n\\fB\\-\\-from\\-git\\fR[^\n]*\nDeprecated alias for \\-\\-adopt\n//g' man/man1/mise.1''',
|
|
]
|
|
|
|
["render:help"]
|
|
description = 'Render help documentation'
|
|
depends = ["build"]
|
|
env = { NO_COLOR = "1" }
|
|
sources = ["mise"]
|
|
outputs = ["README.md"]
|
|
run = "mise render-help"
|
|
|
|
["render:llms"]
|
|
description = 'Generate docs/public/llms.txt (docs index for AI agents)'
|
|
# render:usage writes docs/cli/*.md and render:help writes cli_commands.ts,
|
|
# both of which the index is built from.
|
|
depends = ["render:usage", "render:help"]
|
|
sources = [
|
|
"docs/**/*.md",
|
|
"docs/.vitepress/sidebar.ts",
|
|
"docs/.vitepress/llms.ts",
|
|
"docs/.vitepress/llms.test.ts",
|
|
# sidebar.ts builds the CLI section from this, so a render:help change to
|
|
# command visibility must invalidate the index even if no markdown changed.
|
|
"docs/.vitepress/cli_commands.ts",
|
|
# the title and summary come from the docs homepage hero
|
|
"docs/index.md",
|
|
]
|
|
outputs = ["docs/public/llms.txt"]
|
|
run = [
|
|
"node --test docs/.vitepress/llms.test.ts",
|
|
"node docs/.vitepress/llms.ts",
|
|
]
|
|
|
|
[render]
|
|
description = 'Run all render tasks'
|
|
depends = ["render:*"]
|
|
|
|
[snapshots]
|
|
description = "update test snapshots"
|
|
run = "cargo insta test --all-features --accept --unreferenced delete"
|
|
|
|
[test]
|
|
description = "run all tests"
|
|
alias = 't'
|
|
run = ["mise tasks run test:unit", "mise tasks run test:e2e --all"]
|
|
|
|
["test:unit"]
|
|
description = "run unit tests"
|
|
run = "cargo test --all-features --workspace"
|
|
env = { CARGO_TERM_COLOR = "always", "RUST_TEST_THREADS" = "1" }
|
|
|
|
["test:unit-ci"]
|
|
description = "run unit tests with CI time limits"
|
|
# NEXTEST_PROFILE lets CI pick `ci-shared` on shared runners, where the strict
|
|
# ceilings are not a usable signal. Defaults to the strict `ci` profile.
|
|
run = [
|
|
"cargo nextest run --profile ${NEXTEST_PROFILE:-ci} --all-features --ignore-rust-version --no-fail-fast",
|
|
"cargo nextest run --profile ${NEXTEST_PROFILE:-ci} --workspace --exclude mise --ignore-rust-version --no-fail-fast",
|
|
"cargo test --doc --workspace --exclude mise --ignore-rust-version",
|
|
]
|
|
|
|
["test:shuffle"]
|
|
description = 'Run tests with shuffling enabled'
|
|
run = 'cargo +nightly test --all-features -- -Z unstable-options --shuffle'
|
|
|
|
[install-dev]
|
|
description = 'Install the current project in debug mode'
|
|
run = 'cargo install --path . --debug'
|
|
|
|
[pre-commit]
|
|
description = 'Run pre-commit hooks'
|
|
env = { PRE_COMMIT = 1 }
|
|
run = ["mise run lint"]
|
|
|
|
[flamegraph]
|
|
description = 'Generate a flamegraph for performance analysis'
|
|
tools = { "cargo:flamegraph" = "latest" }
|
|
env = { CARGO_PROFILE_RELEASE_DEBUG = "true" }
|
|
run = 'cargo flamegraph'
|