-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixfmt always updates mtime #99
Comments
/cc @SebTM that added the formatter. Fixing that issue upstream is generally relatively easy so I would suggest contacting them and asking if they can make the formatter compliant with the treefmt formatter spec. |
See referenced issue, I summarized the report and issue but I can't address it due to lack of Haskell knowledge myself. |
Resolved with v0.6.0 - but I can't close the issue ✌️ |
nixos-unstable is still on nixfmt 0.5.0 at the moment |
NixOS 23.11 got released and includes nixfmt v0.6.0 by default ✌🏻 |
Describe the bug
Running nixfmt always sets the mtime to the current date even if the contents didn't change.
To Reproduce
Add some nix files to the workspace and observe the mtime each time
treefmt --no-cache
is run.Expected behavior
treefmt-nix should not support nixfmt since it changes mtime and thus doesn't comply with idempotence requirement of the formatter specification.
Additionally it would be nice to have a list on https://numtide.github.io/treefmt/formatters/ with known unsupported formatters and their reasons for not being supported.
System information
The text was updated successfully, but these errors were encountered: