From f25b75486b9bdd14fbdcfd75d301ff2b965c1045 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Tue, 6 Oct 2026 08:37:01 +0700 Subject: [PATCH] Release gate: the agent-audit test builds in release mode `cargo xtask ci` runs clippy and the tests with --release, where egui has no Style::debug (it exists only with debug_assertions), so ui_agent_audit.rs failed to compile since M13.14. The debug option is set only in debug builds, and the test, which needs the widget types egui records with it, is ignored in release builds. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/tests/ui_agent_audit.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/tests/ui_agent_audit.rs b/crates/ui-egui/tests/ui_agent_audit.rs index 246a0039..a14f7783 100644 --- a/crates/ui-egui/tests/ui_agent_audit.rs +++ b/crates/ui-egui/tests/ui_agent_audit.rs @@ -123,6 +123,7 @@ fn gaps_of(h: &mut Harness<'_, EffectcraftApp>, p: PanelKind) -> Vec { } #[test] +#[cfg_attr(not(debug_assertions), ignore = "egui records widget types only in debug builds")] fn every_panel_registers_automation_ids_for_its_widgets() { let mut s = session(); // Content for the selection-driven panels: the title (text with effects), a Render Queue @@ -133,7 +134,9 @@ fn every_panel_registers_automation_ids_for_its_widgets() { let title = s.active_comp().unwrap().layers.iter().find(|l| l.name == "EFFECTCRAFT").map(|l| l.id.0).unwrap(); let mut h = harness(s); h.state_mut().ui.layer_panel = Some(title); - // egui records widget types (to tell labels from controls) with this debug option. + // egui records widget types (to tell labels from controls) with this debug option, which + // only debug builds have. + #[cfg(debug_assertions)] h.ctx.all_styles_mut(|st| st.debug.show_interactive_widgets = true); let mut gaps = vec![]; for p in PanelKind::ALL {