Skip to content
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

Deprecate recursive mode #240

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Deprecate recursive mode #240

merged 2 commits into from
Sep 3, 2024

Conversation

infinisil
Copy link
Member

The recursive mode has caused problems because it doesn't do any filtering, which can mess with files in .git directories and elsewhere. While we could support sane implicit filters and an interface to filter explicitly, that adds complexity and maintenance burden.

Instead, we can promote the use of treefmt instead, a "formatting multiplexer", which supports file filtering by default. So nixfmt will only be the "backend" formatter, while treefmt is the frontend.

Previously discussed in a team meeting here:
#151 (comment)

Copy link

github-actions bot commented Aug 26, 2024

Nixpkgs diff

@infinisil infinisil linked an issue Aug 26, 2024 that may be closed by this pull request
@infinisil infinisil mentioned this pull request Aug 26, 2024
@infinisil infinisil force-pushed the deprecate-passing-directories branch 3 times, most recently from d3df458 to 423417a Compare August 26, 2024 23:54
The recursive mode has caused problems because it doesn't do any
filtering, which can mess with files in `.git` directories and
elsewhere. While we could support sane implicit filters and an interface
to filter explicitly, that adds complexity and maintenance burden.

Instead, we can promote the use of `treefmt` instead, a "formatting
multiplexer", which supports file filtering by default. So `nixfmt` will
only be the "backend" formatter, while `treefmt` is the frontend.

Previously discussed in a team meeting here:
#151 (comment)
@infinisil infinisil force-pushed the deprecate-passing-directories branch from 423417a to ba0c3fa Compare August 27, 2024 19:29
This wasn't implemented anymore, and we've also decided to focus on using
treefmt instead, which supports parallel formatting
@infinisil
Copy link
Member Author

While already touching this code, I cleaned up some unneeded code that was needed for parallelism in the past. That's not implemented anymore though, and treefmt can be used for parallelism instead.

@dasJ dasJ mentioned this pull request Sep 2, 2024
@infinisil infinisil merged commit 2a1100d into master Sep 3, 2024
2 checks passed
@infinisil infinisil deleted the deprecate-passing-directories branch September 3, 2024 18:10
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/formatting-team-meeting-2024-09-03/51584/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Remove recursive mode
4 participants