diff --git a/justfile b/justfile index 81e571a..86b78d7 100644 --- a/justfile +++ b/justfile @@ -6,9 +6,12 @@ # Install the `just` runner: cargo install just # (Windows, skip the from-source build: winget install Casey.Just) # -# Pin bash for deterministic behaviour on Windows (Git Bash) rather than -# relying on just's default shell resolution. +# Recipes are plain `cargo` commands (no shell-specific syntax), so run each +# platform under its native shell. On Windows use PowerShell: just's default +# (sh / Git Bash) is a non-login shell that often lacks ~/.cargo/bin on PATH, +# which surfaces as `cargo: command not found`. set shell := ["bash", "-cu"] +set windows-shell := ["powershell.exe", "-NoProfile", "-NoLogo", "-Command"] # Default: list recipes. default: @@ -26,28 +29,28 @@ lint: cargo check --workspace --all-targets cargo clippy --workspace --all-targets -- -D clippy::all -# Auto-fix: rewrite formatting + apply machine-applicable clippy fixes. -# --allow-dirty/--allow-staged so it runs over in-progress work; the cost is -# its edits intermix with yours in `git diff`. Anything not machine-fixable -# still surfaces as an error via `-D clippy::all`. +# Runs over in-progress work (--allow-dirty/--allow-staged), so its edits +# intermix with yours in `git diff`; anything not machine-fixable still errors. +# Auto-fix: reformat + apply machine-applicable clippy fixes. lint-fix: cargo fmt --all cargo clippy --fix --workspace --all-targets --allow-dirty --allow-staged -- -D clippy::all # --- Tests ------------------------------------------------------------------- -# Full sweep: lib unit tests + every integration target. Unqualified so the -# set never drifts as tests are added. Includes the slow bench_test (~1 min); -# during tight iteration name the targets you touched instead, or `just fmt`. +# Unqualified so the set never drifts as tests are added. Includes the slow +# bench_test (~1 min); during tight iteration name the targets you touched. +# Full sweep: cargo test (lib unit tests + every integration target). test: cargo test # --- REPL -------------------------------------------------------------------- -# Open the frogql REPL on a database (rebuilds if stale via `cargo run`). -# Extra args pass straight through, so this one recipe covers every variant: +# Rebuilds if stale via `cargo run`. Extra args pass straight through, so one +# recipe covers every variant: # just repl movies.gdb # open existing # just repl movies.gdb --import-csv path/to/dir # create + import, then open # just repl movies.gdb --no-typecheck # skip typecheck this session +# Open the frogql REPL on a database. repl database *args: cargo run --release --bin frogql -- {{database}} {{args}}