blueprint icon indicating copy to clipboard operation
blueprint copied to clipboard

Replace the default formatter with nixfmt-tree

Open zimbatm opened this issue 9 months ago • 2 comments

Is your feature request related to a problem? Please describe.

The current shell wrapper is a bit a bit crude.

Describe the solution you'd like

https://discourse.nixos.org/t/nix-formatting-team-full-nixpkgs-reformat/61867#p-206053-in-other-news-pkgsnixfmt-tree-4

Describe alternatives you've considered

Additional context

zimbatm avatar Mar 20 '25 14:03 zimbatm

Very nice enhancement. But we do not (yet) have a policy regarding which NixOS branches we support, right?

nixfmt-tree seems to be in unstable only for the moment and not backported. Fine for me personally, as I don't use stable releases at all atm, but it might be good to either

  • clarify that we support unstable only
  • backport nixfmt-tree upstream
  • wait for 25.05 to be released in ~2 months before adding it

phaer avatar Mar 21 '25 10:03 phaer

Right. We should generally try to be back-compat with the last release. We're also missing tests to catch regressions on older releases.

For this specific issue, it's not urgent. We can wait 2 more months.

zimbatm avatar Mar 24 '25 10:03 zimbatm