-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathjustfile
More file actions
57 lines (46 loc) · 1.63 KB
/
justfile
File metadata and controls
57 lines (46 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Generates the initial files for the formatter
gen-formatter:
cargo run -p xtask_codegen -- formatter
# Generates the code of the grammar
gen-grammar:
cargo run -p xtask_codegen -- grammar r
# Generates the `air.schema.json`
gen-schema:
cargo run -p xtask_codegen -- json-schema
# Run the tests
test *ARGS:
cargo nextest run {{ARGS}}
# Run the tests in verbose mode
# `--no-capture` forces stdout/stderr to be shown for all tests, not just failing ones,
# and also forces them to be run sequentially so you don't see interleaved live output
test-verbose *ARGS:
cargo nextest run --no-capture {{ARGS}}
# Run the insta tests in update mode
test-insta *ARGS:
cargo insta test --test-runner nextest {{ARGS}}
# Run the quick formatter test
test-quick:
cargo test --package air_r_formatter --test quick_test -- quick_test --exact --show-output --ignored
# Install the air binary to `~/.cargo/bin/air`.
# Note that a `~/.local/bin/air` installed another way may shadow this.
install-binary:
cargo install --path crates/air
install-vscode:
cd editors/code && rm -rf *.vsix && vsce package && code --install-extension *.vsix
install-positron:
cd editors/code && rm -rf *.vsix && vsce package && positron --install-extension *.vsix
# For local wheel testing. Will generate:
#
# ```
# wheel/air_formatter-{version}-py3-none-any.whl
# ```
#
# which works on the system it was built on.
build-wheel:
cargo build --release
mkdir -p python/scripts
cp target/release/air python/scripts/air
uv build --wheel --out-dir wheel/ python/
# Run the wheel created by `build-wheel`
run-wheel *ARGS:
uv tool run --from wheel/*.whl air {{ARGS}}