From ef172d453a0e6e039de305adb753aa4f0d090681 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Sat, 2 Aug 2025 16:20:33 -0400 Subject: [PATCH 1/6] Temporarily break `wasm` feature of `gix-diff` to check CI As noted in #2092, the `wasm` jobs on CI do not test `gix-diff` directly. However, my prediction there that breakage would not be detected on CI is likely mistaken, because those jobs do test the `wasm` feature of `gix-pack`. The `gix-pack` crate depends on `gix-diff`, and its `wasm` feature enable the `gix-diff` one. This temporary change checks that CI does fail when the `wasm` feature of `gix-diff` is broken in a simple way, even though it does not currently run WASM tests of `gix-diff` directly. This also temporarily makes the `wasm` matrix non-fail-fast, so that more failures can be observed. --- .github/workflows/ci.yml | 1 + gix-diff/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73417387ded..c8493856fb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -401,6 +401,7 @@ jobs: strategy: matrix: target: [ wasm32-unknown-unknown, wasm32-wasip1 ] + fail-fast: false env: TARGET: ${{ matrix.target }} diff --git a/gix-diff/Cargo.toml b/gix-diff/Cargo.toml index 1e81f480d20..a564ecf234f 100644 --- a/gix-diff/Cargo.toml +++ b/gix-diff/Cargo.toml @@ -44,7 +44,7 @@ gix-traverse = { version = "^0.47.0", path = "../gix-traverse", optional = true thiserror = "2.0.0" imara-diff = { version = "0.1.8", optional = true } serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] } -getrandom = { version = "0.2.8", optional = true, default-features = false, features = ["js"] } +getrandom = { version = "0.2.8", optional = true, default-features = false } bstr = { version = "1.12.0", default-features = false } document-features = { version = "0.2.0", optional = true } From ea2ea84e1d7ee9dea85884d2d213d7cb6a2f30b5 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Sat, 2 Aug 2025 16:33:23 -0400 Subject: [PATCH 2/6] Add `gix-diff` WASM check, even though `gix-path` covers it This adds an explicit check of `gix-diff` in the WASM jobs, even though the `gix-path` check currently covers `gix-diff` (its `wasm` feature enables the `wasm` feature of its `gix-diff` dependency). --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8493856fb4..8291c91828a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -461,7 +461,7 @@ jobs: - name: crates with 'wasm' feature run: | set -x - for crate in gix-pack; do + for crate in gix-diff gix-pack; do cargo build -p "$crate" --features wasm --target "$TARGET" done - name: gix-pack with all features (including wasm) From 36458ecd50736930d93feb4f835529c5bef854b5 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Sat, 2 Aug 2025 16:36:02 -0400 Subject: [PATCH 3/6] Undo intentional breakage This reverts commit 29bc9737d416c61a8358948aed46221542f13d9b, which temporarily broke the `wasm` feature of `gix-diff` to check CI. --- .github/workflows/ci.yml | 1 - gix-diff/Cargo.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8291c91828a..5f247dcf478 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -401,7 +401,6 @@ jobs: strategy: matrix: target: [ wasm32-unknown-unknown, wasm32-wasip1 ] - fail-fast: false env: TARGET: ${{ matrix.target }} diff --git a/gix-diff/Cargo.toml b/gix-diff/Cargo.toml index a564ecf234f..1e81f480d20 100644 --- a/gix-diff/Cargo.toml +++ b/gix-diff/Cargo.toml @@ -44,7 +44,7 @@ gix-traverse = { version = "^0.47.0", path = "../gix-traverse", optional = true thiserror = "2.0.0" imara-diff = { version = "0.1.8", optional = true } serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] } -getrandom = { version = "0.2.8", optional = true, default-features = false } +getrandom = { version = "0.2.8", optional = true, default-features = false, features = ["js"] } bstr = { version = "1.12.0", default-features = false } document-features = { version = "0.2.0", optional = true } From 4d10cb632c0bc738657a0a4bcc811e107bf9b717 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Sat, 2 Aug 2025 16:49:45 -0400 Subject: [PATCH 4/6] Build `gix-diff` with `--no-default-features` for WASM But continue building default features of `gix-pack`. --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f247dcf478..65c68f04032 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -460,9 +460,8 @@ jobs: - name: crates with 'wasm' feature run: | set -x - for crate in gix-diff gix-pack; do - cargo build -p "$crate" --features wasm --target "$TARGET" - done + cargo build -p gix-diff --no-default-features --features wasm --target "$TARGET" + cargo build -p gix-pack --features wasm --target "$TARGET" - name: gix-pack with all features (including wasm) run: cargo build -p gix-pack --all-features --target "$TARGET" From d9b196747722c016434d5d4652bb0908f2be06bd Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Sat, 2 Aug 2025 16:51:38 -0400 Subject: [PATCH 5/6] Reintroduce temporary breakage to test CI WASM jobs --- .github/workflows/ci.yml | 1 + gix-diff/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65c68f04032..864f15562d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -401,6 +401,7 @@ jobs: strategy: matrix: target: [ wasm32-unknown-unknown, wasm32-wasip1 ] + fail-fast: false env: TARGET: ${{ matrix.target }} diff --git a/gix-diff/Cargo.toml b/gix-diff/Cargo.toml index 1e81f480d20..a564ecf234f 100644 --- a/gix-diff/Cargo.toml +++ b/gix-diff/Cargo.toml @@ -44,7 +44,7 @@ gix-traverse = { version = "^0.47.0", path = "../gix-traverse", optional = true thiserror = "2.0.0" imara-diff = { version = "0.1.8", optional = true } serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] } -getrandom = { version = "0.2.8", optional = true, default-features = false, features = ["js"] } +getrandom = { version = "0.2.8", optional = true, default-features = false } bstr = { version = "1.12.0", default-features = false } document-features = { version = "0.2.0", optional = true } From 61833c55ac58cf732e17a52d9035a235e71a550c Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Sat, 2 Aug 2025 16:55:12 -0400 Subject: [PATCH 6/6] Reremove the temporary breakage --- .github/workflows/ci.yml | 1 - gix-diff/Cargo.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 864f15562d0..65c68f04032 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -401,7 +401,6 @@ jobs: strategy: matrix: target: [ wasm32-unknown-unknown, wasm32-wasip1 ] - fail-fast: false env: TARGET: ${{ matrix.target }} diff --git a/gix-diff/Cargo.toml b/gix-diff/Cargo.toml index a564ecf234f..1e81f480d20 100644 --- a/gix-diff/Cargo.toml +++ b/gix-diff/Cargo.toml @@ -44,7 +44,7 @@ gix-traverse = { version = "^0.47.0", path = "../gix-traverse", optional = true thiserror = "2.0.0" imara-diff = { version = "0.1.8", optional = true } serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] } -getrandom = { version = "0.2.8", optional = true, default-features = false } +getrandom = { version = "0.2.8", optional = true, default-features = false, features = ["js"] } bstr = { version = "1.12.0", default-features = false } document-features = { version = "0.2.0", optional = true }