From 18e92e59d18e59353a70cde8c938b65d7d495a26 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sun, 1 Nov 2026 17:27:03 -0800 Subject: [PATCH] build(nix): the neutral crates' tests run in linux-nextest linux-nextest ran only the tests of the Linux packages (-p komorebi -p komorebi-linux ...). The tests of komorebi-layouts, komorebi-scrolling, komorebi-themes and the shared crates/* (backend, collections, config, core, protocol, settings, transport, komorebic-core) ran in no nix check. They are platform neutral, so the check now names them too (explicit -p list: with --workspace the feature unification of komorebi-daemon breaks windows-future on Linux), and runs with --no-fail-fast so one run lists every failure. Two of those tests read files that the Linux source did not have: the schemas of every platform (komorebi-config schemas test) and the macOS CLI pages (komorebic-core docs_cli), so nix/workspace-src.nix keeps schemas/ and docs/macos/cli/ in the Linux source. Verified: nix build .#checks.x86_64-linux.linux-nextest, 1532 tests run, 1532 passed (9.1 s of test time). --- nix/linux/flake-module.nix | 26 +++++++++++++++++++++++++- nix/workspace-src.nix | 5 ++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/nix/linux/flake-module.nix b/nix/linux/flake-module.nix index 58d3876d..4b6d7d9e 100644 --- a/nix/linux/flake-module.nix +++ b/nix/linux/flake-module.nix @@ -133,7 +133,31 @@ in } ); - linux-nextest = build.craneLib.cargoNextest (build.individualCrateArgs // { doCheck = true; }); + # the Linux packages and the platform-neutral crates (layouts, scrolling, themes and the + # shared crates/*), whose tests ran in no check. Not `--workspace`: that unifies the + # features of komorebi-daemon and the crates it pulls in, and windows-future fails to build. + linux-nextest = build.craneLib.cargoNextest ( + build.individualCrateArgs + // { + doCheck = true; + cargoNextestExtraArgs = "--no-fail-fast"; + cargoExtraArgs = + "--locked ${build.packages} " + + lib.concatMapStringsSep " " (p: "-p ${p}") [ + "komorebi-layouts" + "komorebi-scrolling" + "komorebi-themes" + "komorebi-backend" + "komorebi-collections" + "komorebi-config" + "komorebi-core" + "komorebi-protocol" + "komorebi-settings" + "komorebi-transport" + "komorebic-core" + ]; + } + ); # The bridge is not Rust: tsc checks its types from its JSDoc comments, and node runs # its tests against a fake KWin. No package.json and no build step. diff --git a/nix/workspace-src.nix b/nix/workspace-src.nix index a1424241..ed0cebdc 100644 --- a/nix/workspace-src.nix +++ b/nix/workspace-src.nix @@ -126,7 +126,10 @@ let # the script komorebi loads into KWin and the JSON the tests and the daemon read (lib.hasSuffix ".js" rel || lib.hasSuffix ".json" rel) && !(lib.hasPrefix "docs/" rel || lib.hasPrefix "schemas/" rel) - || lib.hasPrefix "schemas/linux/" rel + # the schemas of every platform: a test of komorebi-config compares them + || lib.hasPrefix "schemas/" rel + # the macOS CLI pages that a test of komorebic-core compares with the commands + || lib.hasPrefix "docs/macos/cli/" rel || lib.hasPrefix "spikes/config-parity/" rel || builtins.elem rel [ # the example configuration and the sample key bindings that `komorebic quickstart` includes