Commit Graph
4 Commits
Author SHA1 Message Date
LGUG2Z 73c43239b5 chore(repo): one rustfmt, toolchain, gitignore and licence; format-all checks one group
komorebi-for-kde and komorebi-for-mac each had a rustfmt.toml (the root one minus
newline_style), a rust-toolchain.toml and .envrc (identical to the root's), a .gitignore and
a LICENSE.md; they are deleted, and the root .gitignore gains the KDE entries (/.vm,
__pycache__/, *.pyc). tools/format-all now has one group: every .rs file of the repository,
file by file with skip_children, with the root rustfmt.toml and the dev shell's nightly
(the --tree option is gone).

Verified: tools/format-all --check passes on the whole tree (the formatting of the six
files edited in the path-fix revision was applied to that revision).
2026-11-05 15:03:27 -08:00
LGUG2Z 2544012c2e fix(nix): check the KDE formatting file by file with the flake's nightly rustfmt
The kfde fmt check ran `cargo fmt -p ...` and failed with `failed to resolve
mod windows` for komorebic and komorebi-client: rustfmt follows the
cfg_select! branches of the shared entry files into files the KDE source does
not have. It is now a runCommand running tools/format-all --tree kde with the
rustfmt of the flake's own nightly (fmtToolchain, the toolchain craneLibFmt
already used) over komorebi-for-kde/**/*.rs and the linux modules of the
shared crates, file by file with skip_children and komorebi-for-kde/rustfmt.toml.
tools/format-all now takes the rustfmt of the root dev shell first (the same
pinned nightly) before a nightly on PATH, because a different nightly may
format differently or not follow cfg_select.

Verified: with the rustfmt of that very nightly (rust-overlay 19ecdd08,
rustfmt 1.11.0-nightly 2026-10-27, built from the flake's pins)
tools/format-all --check passes for kde, mac and windows on this tree, so the
only failure was the module resolution, not different formatting. The nix
attribute evaluates; not built.
2026-11-05 15:03:27 -08:00
LGUG2Z c670ab35c8 fix(tools): format-all passes its own arguments on when it re-runs inside the dev shell
format-all re-executes itself under 'nix develop' to get the nightly rustfmt, but it did so after its argument loop had shifted every argument away, so the re-run always used the defaults (--check, all trees): '--apply' silently only checked. The original arguments are now saved before parsing and passed on. Found when applying the final formatting of candidate 8: '--apply --tree windows' printed diffs and changed nothing. Verified: bash -n; the revisions after this one are the result of running --apply.
2026-11-05 15:03:27 -08:00
LGUG2Z c0ca0a83ad fix(nix): check the Windows formatting with the nightly rustfmt over the Windows files; add tools/format-all
The Windows fmt check ran the stable `cargo fmt` over the stubbed workspace
source: it failed on the empty stub lib.rs files of the other platforms, on
`mod linux;`/`mod macos;` of the shared entry files (the Windows source does
not have those modules), and its stable rustfmt ignores the nightly options of
rustfmt.toml. It is now a runCommand running tools/format-all --tree windows
with the nightly rustfmt over the files of the Windows source (build.real, no
stubs), file by file with skip_children.

tools/format-all runs the same check locally (--check, or --apply to format;
--tree windows|mac|kde|all; the nightly rustfmt from $RUSTFMT, PATH or the
root dev shell). mac is the explicit-file invocation of the kfm check, kde is
`cargo fmt -p ...` as the KDE check does.

Verified: in a throwaway copy of wip-cand7, --apply formats 17 Windows files
(+211 -88; crates/ komorebi-backend, bar-core, core, protocol, bar windows
modules, client windows.rs, komorebi-gui, testwin) and 12 KDE files
(+22 -29); afterwards --check passes for windows, mac and kde. The formatting
itself is not in this revision (other agents are editing those files). The nix
attribute evaluates; not built.
2026-11-05 15:03:26 -08:00