Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

build: improve iteration speed on several fronts (#3756)

Elijah Potter6a9bd3fa6442
diff --git a/.github/workflows/just_checks.yml b/.github/workflows/just_checks.yml
index 954803917..ae6f719ac 100644
--- a/.github/workflows/just_checks.yml
+++ b/.github/workflows/just_checks.yml
@@ -53,6 +53,10 @@ jobs:
sudo apt-get install -y libappindicator3-dev || true
- name: Rust Cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
+ with:
+ # Give each matrix task its own cache. Without this, every job
+ # shares one cache key and all but one rebuild from scratch.
+ key: ${{ matrix.task }}
- uses: cargo-bins/cargo-binstall@910d9e4456ce4b039662d2a02a34ef1d23c3c50c # main
- name: Install `wasm-pack`
run: cargo binstall wasm-pack --force --no-confirm
diff --git a/justfile b/justfile
index 33edcca1d..3b193b03e 100644
--- a/justfile
+++ b/justfile
@@ -321,10 +321,13 @@ test-firefox-plugin: build-firefox-plugin
# Run VSCode plugin unit and integration tests.
alias test-vscode-extension := test-vscode
-test-vscode:
+test-vscode:
#!/usr/bin/env bash
set -eo pipefail
+ # Needed so `pnpm install` can succeed.
+ DISABLE_WASM_OPT=1 just build-harperjs
+
ext_dir="{{justfile_directory()}}/packages/vscode-plugin"
bin_dir="${ext_dir}/bin"
@@ -333,7 +336,7 @@ test-vscode:
fi
echo Building binaries
- cargo build --release -q
+ cargo build --release -p harper-ls
cp "{{justfile_directory()}}/target/release/harper-ls"* "$bin_dir"