cursorless-dev / cursorless

Don't let the cursor slow you down
https://www.cursorless.org/
MIT License
1.15k stars 81 forks source link

Don't install pre-commit hooks in nix flake #2461

Open pokey opened 5 months ago

pokey commented 5 months ago

Why do we install pre-commit hooks in our nix flake? I would be strongly inclined to remove that step, but maybe there's some reason we have to do this as setting up the nix flake? Totally missed that that was what was happening in #1908

cc/ @auscompgeek @fidgetingbits

fidgetingbits commented 5 months ago

It's not required no. Since it's a development shell, and I assume people using it would be committing things, it made sense to install the hooks? I don't mind removing it, but also curious why you think it's bad? Does it clobber existing tools if you already had them and then test the dev shell or something?

Lots of flakes do it afaik, but also would be ok to just print a message in the shellHook saying it pre-commit install can be run if needed?

pokey commented 5 months ago

Just feels a bit invasive. I don't have them installed locally so was surprised when I couldn't commit something and couldn't figure out why. Turned out it was because I had tested out the flake PR

For me, setting up the flake shouldn't have any impact on non-flake setup. I had thought isolation was one of the goals

fidgetingbits commented 5 months ago

Ah interesting, that makes sense. Bad assumption on my part. I'll send a PR to remove it.

Why don't you use pre-commit locally out of curiosity. I specifically wonder about cases where it would catch stuff that can't be auto fixed by running it in CI?

pokey commented 5 months ago

I prefer my git commit to be dumb, fast, and predictable. It's plumbing