fix: pin alejandra 4.0.0 to keep tabs in indented strings #11

Merged
marti merged 1 commit from t3/fix-t3code-update-format-check into main 2026-10-29 11:10:01 +01:00
Owner

Summary

  • The daily nix flake update bumped nixpkgs, which pulled alejandra 4.0.0 -> 4.1.0 and broke the format check on 8 files.
  • alejandra 4.1.0 ignores indentation = "Tabs" inside '' strings and re-indents them with spaces, mangling every multi-line script in the repo.
  • Add nix/alejandra.nix, which overrides nixpkgs' alejandra back to 4.0.0 with the previous source and cargo vendor hashes, and documents when the pin can be lifted.
  • Point formatter, the format check and the dev shell at the pinned build (self'.formatter) so a future nixpkgs bump cannot change the formatting rules again.
  • flake.lock is intentionally unchanged; the daily update job owns it.

Trade-off: 4.0.0 is now built from source against the new nixpkgs instead of coming from the binary cache. It is a small Rust crate, so the added CI time is minor.

Testing

  • nix eval --raw .#formatter.x86_64-linux.version reports 4.0.0.
  • nix fmt . succeeds and only formatted the new file.
  • nix flake check -L passes, including check-format (14 files, "Congratulations! Your code complies with the Alejandra style.") and check-lint.
  • nix flake check passes again after restoring flake.lock to its original state.
  • Not run: the daily T3 Code workflow itself; it should pass on the first run after this lands on main.
## Summary - The daily `nix flake update` bumped nixpkgs, which pulled alejandra 4.0.0 -> 4.1.0 and broke the format check on 8 files. - alejandra 4.1.0 ignores `indentation = "Tabs"` inside `''` strings and re-indents them with spaces, mangling every multi-line script in the repo. - Add `nix/alejandra.nix`, which overrides nixpkgs' alejandra back to 4.0.0 with the previous source and cargo vendor hashes, and documents when the pin can be lifted. - Point `formatter`, the `format` check and the dev shell at the pinned build (`self'.formatter`) so a future nixpkgs bump cannot change the formatting rules again. - `flake.lock` is intentionally unchanged; the daily update job owns it. Trade-off: 4.0.0 is now built from source against the new nixpkgs instead of coming from the binary cache. It is a small Rust crate, so the added CI time is minor. ## Testing - `nix eval --raw .#formatter.x86_64-linux.version` reports `4.0.0`. - `nix fmt .` succeeds and only formatted the new file. - `nix flake check -L` passes, including `check-format` (14 files, "Congratulations! Your code complies with the Alejandra style.") and `check-lint`. - `nix flake check` passes again after restoring `flake.lock` to its original state. - Not run: the daily T3 Code workflow itself; it should pass on the first run after this lands on `main`.
- Add nix/alejandra.nix overriding the nixpkgs alejandra with the 4.0.0 source and cargo vendor hashes.
- Use the pinned formatter for the flake formatter, the check-format check and the dev shell.
- 4.1.0 re-indents '' string contents with spaces regardless of `indentation = "Tabs"`, mangling multi-line scripts in this repo.
marti merged commit d3ca5d39b0 into main 2026-10-29 11:10:01 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marti/agent-env!11
No description provided.