From 283a1484202601689f905e4b02fc483f347f1fdf Mon Sep 17 00:00:00 2001 From: Naseq Date: Sun, 8 Nov 2026 09:07:05 +0430 Subject: [PATCH 1/3] ui-egui: cfg opening_generation off wasm32; lint the wasm set with -D warnings (#1954) --- crates/ui-egui/src/app.rs | 1 + crates/ui-egui/src/lib.rs | 3 ++- xtask/src/main.rs | 8 +++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index 178ab24ba..5c1314657 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -72,6 +72,7 @@ impl SlideApp { synthetic_injected_time: None, ribbon_scroll: HashMap::new(), show_instance: 0, + #[cfg(not(target_arch = "wasm32"))] opening_generation: 0, canvas_rect: None, eyedropper: None, diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 08fcc2391..0d2f1787b 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -276,7 +276,8 @@ pub struct SlideApp { ribbon_scroll: HashMap, /// Monotonic identity for a new slide show instance (`start_show`). show_instance: u64, - /// Monotonic identity for a new background-open attempt. + /// Monotonic identity for a new background-open attempt (the web build has no threads). + #[cfg(not(target_arch = "wasm32"))] opening_generation: u64, /// Canvas screen rect and points-per-slide-point scale (for control & tests). pub canvas_rect: Option, diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 632769fb3..15a0d604e 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -147,13 +147,15 @@ fn cmd_wasm() -> Result<(), String> { if set.is_empty() { return Err("no wasm-safe crates found in the workspace metadata".into()); } + // Clippy with `-D warnings`, as the host step: a plain `check` let wasm-only dead code through (#1954). let mut c = cargo(); - c.args(["check", "--target", "wasm32-unknown-unknown", "--keep-going"]); + c.args(["clippy", "--target", "wasm32-unknown-unknown", "--keep-going"]); for pkg in &set { c.args(["-p", pkg]); } - run(c, &format!("cargo check --target wasm32-unknown-unknown --keep-going -p {}", set.join(" -p ")))?; - println!("\nwasm32-unknown-unknown check: ok ({} crates: {})", set.len(), set.join(", ")); + c.args(["--", "-D", "warnings"]); + run(c, &format!("cargo clippy --target wasm32-unknown-unknown --keep-going -p {} -- -D warnings", set.join(" -p ")))?; + println!("\nwasm32-unknown-unknown clippy: ok ({} crates: {})", set.len(), set.join(", ")); Ok(()) } From 6b1e2d6aef6da601f515e10b31d65bca2c3efc74 Mon Sep 17 00:00:00 2001 From: aiongg <67543387+aiongg@users.noreply.github.com> Date: Sun, 8 Nov 2026 04:50:32 +0000 Subject: [PATCH 2/3] Apply review fixes - xtask/src/main.rs --- xtask/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 15a0d604e..c4d4a2429 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -22,7 +22,7 @@ commands: assets check that every icon/image/font/asset is attributed in ATTRIBUTION.md pdf-deps verify pinned writer sources and the production feature boundary layers enforce the crate dependency layering (plan/architecture.md §3) - wasm cargo check --target wasm32-unknown-unknown for the wasm-safe crates (one call) + wasm cargo clippy --target wasm32-unknown-unknown -D warnings for the wasm-safe crates (one call) test workspace tests (cargo nextest when installed, else cargo test), then doctests ci fmt --check, pdf-deps, clippy -D warnings, test, doctest, assets, layers, wasm (stops at first failure) @@ -139,7 +139,7 @@ fn wasm_set() -> Result, String> { .collect()) } -/// One `cargo check` for the whole set: each crate is checked once, and +/// One `cargo clippy -- -D warnings` for the whole set: each crate is checked once, and /// `--keep-going` still reports every failing crate. Features unify across the /// set, so each crate is checked with the union of the features the set enables. fn cmd_wasm() -> Result<(), String> { From 68a4190f952453bd4024ee29e82e6b9f8d8f4bb0 Mon Sep 17 00:00:00 2001 From: Naseq Date: Sat, 14 Nov 2026 13:52:49 +0430 Subject: [PATCH 3/3] Leave the xtask wasm gate unchanged The CI gate change (wasm step from check to clippy -D warnings) belongs in its own CI task; this PR keeps only the opening_generation cfg fix (#1954). --- xtask/src/main.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index c4d4a2429..632769fb3 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -22,7 +22,7 @@ commands: assets check that every icon/image/font/asset is attributed in ATTRIBUTION.md pdf-deps verify pinned writer sources and the production feature boundary layers enforce the crate dependency layering (plan/architecture.md §3) - wasm cargo clippy --target wasm32-unknown-unknown -D warnings for the wasm-safe crates (one call) + wasm cargo check --target wasm32-unknown-unknown for the wasm-safe crates (one call) test workspace tests (cargo nextest when installed, else cargo test), then doctests ci fmt --check, pdf-deps, clippy -D warnings, test, doctest, assets, layers, wasm (stops at first failure) @@ -139,7 +139,7 @@ fn wasm_set() -> Result, String> { .collect()) } -/// One `cargo clippy -- -D warnings` for the whole set: each crate is checked once, and +/// One `cargo check` for the whole set: each crate is checked once, and /// `--keep-going` still reports every failing crate. Features unify across the /// set, so each crate is checked with the union of the features the set enables. fn cmd_wasm() -> Result<(), String> { @@ -147,15 +147,13 @@ fn cmd_wasm() -> Result<(), String> { if set.is_empty() { return Err("no wasm-safe crates found in the workspace metadata".into()); } - // Clippy with `-D warnings`, as the host step: a plain `check` let wasm-only dead code through (#1954). let mut c = cargo(); - c.args(["clippy", "--target", "wasm32-unknown-unknown", "--keep-going"]); + c.args(["check", "--target", "wasm32-unknown-unknown", "--keep-going"]); for pkg in &set { c.args(["-p", pkg]); } - c.args(["--", "-D", "warnings"]); - run(c, &format!("cargo clippy --target wasm32-unknown-unknown --keep-going -p {} -- -D warnings", set.join(" -p ")))?; - println!("\nwasm32-unknown-unknown clippy: ok ({} crates: {})", set.len(), set.join(", ")); + run(c, &format!("cargo check --target wasm32-unknown-unknown --keep-going -p {}", set.join(" -p ")))?; + println!("\nwasm32-unknown-unknown check: ok ({} crates: {})", set.len(), set.join(", ")); Ok(()) }