513efcdcff
- Updated `Cargo.toml` files across multiple crates to replace local `egui` and `eframe` dependencies with workspace references, ensuring consistent platform support. - Enhanced `run_all_tests.bat` and `run_all_tests.sh` scripts to capture and report names of failed and skipped crates, improving test diagnostics. - Fixed duplicate keys in `hcie-text/Cargo.toml` and ensured proper feature activation for Linux builds in affected crates. - Added a new repair plan document outlining steps to address failing crates and improve overall test execution reliability.
6.3 KiB
6.3 KiB
Failing Crates Repair Plan
Goal
Make the bulk Linux and Windows test runners complete without platform-feature build failures, preserve compilation coverage for the existing egui visual examples, and report the exact names of failed crates instead of only a count.
Confirmed Findings
hcie-blendfails because itseframedev-dependency disables defaults without enabling either Linux backend;winit 0.30.13therefore emits “platform ... not supported”.- The same manifest defect exists in
hcie-draw,hcie-filter,hcie-text, andhcie-vector. hcie-brush-enginesucceeds because it enablesx11;hcie-ioenables bothx11andwayland.- The root workspace already defines the intended cross-platform
eframeconfiguration withwaylandandx11. hcie-text/Cargo.tomlcurrently repeatsproptestandapprox, which is a duplicate-key manifest error and must be fixed before any Cargo validation.- The supplied terminal output proves one named failure (
hcie-blend) and six failures in total. It does not expose all six names, so the prior six-name claim must not be treated as authoritative. run_all_tests.*andrun_tests_categorized.*only retain failure counts. Their--no-4kcommand also places--skipon the Cargo side instead of after Cargo’s--test-harness separator.
Implementation Steps
-
Restore a valid workspace manifest.
- Remove the duplicate
proptestandapproxentries fromhcie-text/Cargo.toml. - Run
cargo metadata --no-depsimmediately; stop if any other manifest error remains.
- Remove the duplicate
-
Centralize visual-example GUI dev-dependencies.
- In
hcie-blend,hcie-brush-engine,hcie-draw,hcie-filter,hcie-text,hcie-vector, andhcie-io, replace crate-localegui = "0.34"and customeframefeature lists withegui = { workspace = true }andeframe = { workspace = true }under[dev-dependencies]. - Preserve all non-GUI dev-dependencies and existing visual examples.
- Do not add GUI dependencies to runtime
[dependencies]and do not modify engine source files. - This intentionally reuses the root’s
default_fonts,glow,persistence,wayland, andx11configuration so platform support cannot drift between crates.
- In
-
Verify feature resolution before compiling.
- Use
cargo tree -p <crate> -e features -i winitfor the five confirmed failing crates and the two known-good comparison crates. - Confirm Linux builds activate at least one backend and the standardized configuration activates both
winit/x11andwinit/wayland.
- Use
-
Improve test-runner diagnostics in both platform versions.
- Update
run_all_tests.sh,run_all_tests.bat,run_tests_categorized.sh, andrun_tests_categorized.batto append every failed crate name to a failure list and every skipped crate name to a skip list. - Print those lists in the final summary while preserving pass/fail/skip counts and non-zero exit status.
- In shell scripts, use arrays for Cargo arguments rather than a space-split string.
- Fix the 4K exclusion to invoke
cargo test -p hcie-engine-api -- --skip benchmark_4k_stroke_on_multilayer_document; apply equivalent quoting and argument ordering in.batfiles. - Keep default
cargo test -p <crate>behavior so examples are compiled; do not hide the defect by globally switching to--tests.
- Update
-
Run focused crate validation.
- Run
cargo check -p <crate> --examplesandcargo test -p <crate>forhcie-blend,hcie-draw,hcie-filter,hcie-text, andhcie-vector. - Re-run
hcie-brush-engineandhcie-ioto detect regressions from dependency centralization. - For
hcie-io, distinguish build/test failures from missing external PSD fixtures; fixture-dependent early returns are not platform compilation failures.
- Run
-
Identify and repair the sixth failure from evidence.
- Run the improved Linux bulk runner first with
--no-io --no-4kfor deterministic feedback. - Read the emitted failed-crate list. If a failure remains outside the five confirmed manifests, capture its first compiler/test error and fix that crate’s actual cause rather than assuming another
winitdefect. - Re-run only the remaining failed crate until green, then repeat the deterministic bulk run.
- Run the improved Linux bulk runner first with
-
Complete end-to-end validation.
- Run
./run_all_tests.sh --no-io --no-4k; require zero failed crates and verify the summary names no failures. - Run
cargo test -p hcie-ioseparately with the expected fixture set or record fixture skips distinctly. - Run the 4K engine test explicitly with the protected command from
AGENTS.mdrather than silently omitting performance coverage. - Validate
.batparity on Windows (or Windows CI): targeted five-crate tests,run_all_tests.bat --no-io --no-4k, correct failed-name reporting, and non-zero exit code on an intentional failing command.
- Run
Risks And Guardrails
- Enabling
x11/waylandcompiles native backend support but does not launch windows during tests; headless execution remains safe because examples are only compiled. - Do not use cached success as proof. At least one validation pass should use a fresh dedicated target directory (
CARGO_TARGET_DIR=target/platform-test) rather than deleting the shared target directory. - Do not alter locked engine logic or protected performance mechanisms; this repair is confined to manifests and test runners unless the newly identified sixth failure proves independent.
- Do not relocate the visual examples in this repair. Removing all GUI dev-dependencies from engine crates would require a separate architecture migration into the GUI workspace.
- The Linux environment cannot establish Windows batch correctness alone; Windows execution is a required validation gate, not an inferred result.
Acceptance Criteria
cargo metadata --no-depssucceeds with no duplicate manifest keys.- The five confirmed crates compile their examples and pass their tests on Linux.
- The bulk runner reports failed crate names and exits zero when all selected crates pass.
./run_all_tests.sh --no-io --no-4kreports zero failed crates from a fresh target directory.- Windows
.batbehavior matches Linux for argument handling, result lists, and exit status. - Any sixth failure is named and resolved from its own diagnostic output, not from dependency-based speculation.