mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-18 06:38:38 +01:00
fast-check classifies the paths of the final directories (komorebi-linux, komorebi-macos,
komorebi-hotkeys, nix/{windows,linux,macos}, docs and schemas per platform), runs the Linux
check from the repository root and evaluates one check and one package per platform in the
root flake; kde-closure-check reads nix/linux/root-crates.json and compares it with the cargo
tree of the Linux packages (the listed crates besides komorebi-linux, komorebi-hotkeys and
komorebi-daemon); mac-check.sh drops the nested-workspace branch; e2e-needed treats nix/windows,
nix/workspace-src.nix, nix/lib.nix and nix/common.nix as fixed inputs of the Windows binaries
and the Linux and macOS trees as outside them; build-ref.sh builds `windows-NAME` for a REF with
the one-flake layout and keeps the old names for an older REF with its own flake. The justfile
names linux-nix-options-validation and runs a VM suite as legacyPackages.<system>.vm.NAME
(the vm-* checks are heavyChecks for now). scripts/linux/{run-kde,vm-mac,sync-e2e-core,
scenario-status} find the repository root and the VM library from scripts/linux/ and nix/linux/
(on the rebase onto wip-cutover-all the coordinator versions of run-kde, vm-mac and
scenario-status were kept: same change).
Not touched: scripts/linux/compare-gen.py, a migration comparison between the three old trees
that still looks for komorebi-for-mac/ (obsolete; open).
Verified: bash -n on the changed scripts; tools/kde-closure-check passes (14 root crates);
tools/fast-check --list classifies this revision as nix-only. fast-check commands for the
platforms were not run.
20 lines
1.3 KiB
Bash
Executable File
20 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Fails if the crates outside the Linux-only crates that the KDE packages depend on differ from the list the
|
|
# Linux source filter uses (nix/linux/root-crates.json, read by nix/workspace-src.nix).
|
|
# Usage: tools/kde-closure-check [REPO_ROOT] (default: the repository this script is in)
|
|
set -euo pipefail
|
|
root=$(cd "${1:-$(dirname "$0")/..}" && pwd)
|
|
# the list holds the crates the Linux source needs besides komorebi-linux, komorebi-hotkeys and komorebi-daemon
|
|
want=$(jq -r '.[]' "$root/nix/linux/root-crates.json" | sort)
|
|
# the closure of the Linux packages on a Linux target
|
|
have=$(cd "$root" && for p in komorebi-linux komorebic komorebi-client komorebi-hotkeys komorebi; do
|
|
nice -n 19 cargo tree --offline --locked -p "$p" --target x86_64-unknown-linux-gnu --prefix none -e normal,build,dev 2>/dev/null
|
|
done | grep -o "($root/[^)]*)" | tr -d '()' | sed "s#^$root/##" \
|
|
| grep -vx -e komorebi-linux -e komorebi-hotkeys -e komorebi-daemon | sort -u)
|
|
if [ "$want" != "$have" ]; then
|
|
echo "Linux source filter and cargo closure differ" >&2
|
|
diff <(echo "$want") <(echo "$have") | sed 's/^</ only in root-crates.json:/; s/^>/ only in cargo closure: /' >&2
|
|
exit 1
|
|
fi
|
|
echo "ok: $(echo "$want" | wc -l) root crates match the Linux cargo closure"
|