Debian Codegraph @

.config/mise.toml

raw
1 #:schema https://mise.jdx.dev/schema/mise.json
2
3 # Mise support is experimental.
4 # See https://jj-vcs.github.io/jj/latest/contributing/#alternative-development-setup-with-mise
5
6 [vars]
7 bacon_version = "3.16.0"
8 cargo_insta_version = "1.46.3"
9 cargo_nextest_version = "0.9.113"
10 rust_version = "1.89"
11 uv_version = "0.8.13"
12 node_version = "24"
13
14 [tools]
15 # We need cargo-binstall so that Mise would download "cargo:" tools instead of building them.
16 "cargo-binstall" = "latest"
17
18 [tasks."review:cli-reference"]
19 description = "Build and review the changes to the command line reference (cli/tests/[email protected])"
20 tools.rust = "{{vars.rust_version}}"
21 tools."cargo:cargo-insta" = "{{vars.cargo_insta_version}}"
22 run = "cargo insta test --review --workspace -- test_generate_md_cli_help"
23
24 [tasks."review:test"]
25 alias = "test:review"
26 description = "Run the tests and review changes to snapshots"
27 tools.rust = "{{vars.rust_version}}"
28 tools."cargo:cargo-insta" = "{{vars.cargo_insta_version}}"
29 tools."cargo:cargo-nextest" = "{{vars.cargo_nextest_version}}"
30 env.NEXTEST_STATUS_LEVEL = "slow"
31 env.NEXTEST_FINAL_STATUS_LEVEL = "none"
32 run = "cargo insta test --review --workspace --test-runner nextest --"
33
34 [tasks."build:cli-reference"]
35 description = "Build the command line reference (cli/tests/[email protected])"
36 tools.rust = "{{vars.rust_version}}"
37 tools."cargo:cargo-insta" = "{{vars.cargo_insta_version}}"
38 run = "cargo insta test --accept --workspace -- test_generate_md_cli_help"
39
40 [tasks."build:debug"]
41 alias = "build"
42 description = "Build jj in debug mode"
43 tools.rust = "{{vars.rust_version}}"
44 run = "cargo build"
45
46 [tasks."build:docs"]
47 description = "Build documentation into rendered-docs/ for offline use"
48 tools.uv = "{{vars.uv_version}}"
49 run = "uv run mkdocs build"
50
51 [tasks."build:web"]
52 description = "Build the new astro-based documentation"
53 tools.node = "{{vars.node_version}}"
54 run = "npm install && npm run build"
55 dir = "web/docs"
56
57 [tasks."build:release"]
58 description = "Build jj in release mode"
59 tools.rust = "{{vars.rust_version}}"
60 run = "cargo build --release"
61
62 [tasks."build:gen-protos"]
63 description = "Generate Protocol Buffers definitions"
64 tools.protoc = "latest"
65 tools.rust = "{{vars.rust_version}}"
66 run = "cargo run --bin gen-protos"
67
68
69 [tasks."check:clippy"]
70 description = "Lint the code with Clippy"
71 tools.rust = "{{vars.rust_version}}"
72 run = "cargo clippy --workspace --all-targets"
73
74 [tasks."check:codespell"]
75 description = "Check code for common misspellings"
76 tools.uv = "{{vars.uv_version}}"
77 run = "uv run codespell $(jj file list)"
78 # Windows commands run through cmd, which cannot expand $(...), so use pwsh
79 run_windows = 'pwsh -NoProfile -Command "uv run codespell $(jj file list)"'
80
81 [tasks."check:format"]
82 description = "Check the code format"
83 tools.rust = "nightly"
84 run = "cargo fmt --check"
85
86 [tasks."check:test"]
87 alias = "test"
88 description = "Run the tests"
89 tools.rust = "{{vars.rust_version}}"
90 tools."cargo:cargo-insta" = "{{vars.cargo_insta_version}}"
91 tools."cargo:cargo-nextest" = "{{vars.cargo_nextest_version}}"
92 env.NEXTEST_STATUS_LEVEL = "slow"
93 env.NEXTEST_FINAL_STATUS_LEVEL = "none"
94 run = "cargo insta test --check --workspace --test-runner nextest --"
95
96 [tasks."check:zizmor"]
97 description = "Check GitHub workflows with Zizmor"
98 tools."cargo:zizmor" = "latest"
99 run = "zizmor ."
100
101
102 [tasks."fix:clippy"]
103 description = "Fix the clippy alerts"
104 tools.rust = "{{vars.rust_version}}"
105 run = "cargo clippy --fix"
106
107 [tasks."fix:codespell"]
108 description = "Fix common code misspellings"
109 tools.uv = "{{vars.uv_version}}"
110 run = "uv run codespell -w $(jj file list)"
111 # Windows commands run through cmd, which cannot expand $(...), so use pwsh
112 run_windows = 'pwsh -NoProfile -Command "uv run codespell -w $(jj file list)"'
113
114 [tasks."fix:format"]
115 description = "Format the code"
116 tools.rust = "nightly"
117 run = "cargo fmt"
118
119 [tasks."fix:test"]
120 alias = "test:accept"
121 description = "Accept changes to snapshot tests"
122 tools.rust = "{{vars.rust_version}}"
123 tools."cargo:cargo-insta" = "{{vars.cargo_insta_version}}"
124 tools."cargo:cargo-nextest" = "{{vars.cargo_nextest_version}}"
125 env.NEXTEST_STATUS_LEVEL = "slow"
126 env.NEXTEST_FINAL_STATUS_LEVEL = "none"
127 run = "cargo insta test --accept --workspace --test-runner nextest --"
128
129
130 [tasks."serve:docs"]
131 description = "Preview documentation with live reloading"
132 tools.uv = "{{vars.uv_version}}"
133 run = "uv run mkdocs serve"
134
135 [tasks."serve:web"]
136 description = "Preview the new astro-based documentation with live reloading"
137 tools.node = "{{vars.node_version}}"
138 run = "npm install && npm run dev"
139 dir = "web/docs"
140
141
142 [tasks."clippy:watch"]
143 description = "Lint the code with Clippy when the code changes"
144 tools.rust = "{{vars.rust_version}}"
145 tools."cargo:bacon" = "{{vars.bacon_version}}"
146 run = "bacon clippy -- --workspace --all-targets"
147
148 [tasks."test:watch"]
149 description = "Run tests when the code changes"
150 tools.rust = "{{vars.rust_version}}"
151 tools."cargo:bacon" = "{{vars.bacon_version}}"
152 tools."cargo:cargo-nextest" = "{{vars.cargo_nextest_version}}"
153 run = "bacon nextest -- --nff --workspace"