NixOS / nixfmt

The official (but not yet stable) formatter for Nix code
https://nixfmt.serokell.io
Mozilla Public License 2.0
936 stars 41 forks source link

`numtide/treefmt` compatibility #88

Closed yorickvP closed 1 year ago

yorickvP commented 2 years ago

User report:

I set up treefmt for my editor and nixfmt fails formatting without any obvious sign. Maybe the spec is incomplete, but I think it had to do with some sort of temp-file mutation. iirc. Maybe treefmt and nixfmt are competing on the file-handling domain in incompatible ways?

yorickvP commented 2 years ago

@blaggacao

SebTM commented 1 year ago

I would like to hijack this as nixfmt was added by me to treefmt without seeing this - it works fine (from formatting output) but it changes mtime even file didn't had to be reformatted which was reported here and violates the idempotence requirement from treefmt.

Sadly I don't have any Haskell knowledge and currently no time to get into so I would appreciate if someone could help out here :v: