206
dpc_01234 | 9 hours ago | 10 Comment
I'm advocating for JJ to build a proper daemon that runs "checks" per change in the background. So you don't run pre-commit checks when committing. They just happen in the background, and when by the time you get to sharing your changes, you get all the things verified for you for each change/commit, effortlessly without you wasting time or needing to do anything special.
I have something a bit like that implemented in SelfCI (a minimalistic local-first Unix-philosophy-abiding CI) https://app.radicle.xyz/nodes/radicle.dpc.pw/rad%3Az2tDzYbAX... and it replaced my use of pre-commit hooks entirely. And users already told me that it does feel like commit hooks done right.
Show Reply 10 [+]
timhh | 11 hours ago | 2 Comment
I'm sure this is more reliably than pre-commit, but you still have hooks building Python wheels and whatnot, which fails annoyingly often.
The VFS stuff is not quite finished yet though (it's really complicated). If anyone wants to help me with that it would be welcome!
Show Reply 2 [+]
jdxcode | 11 hours ago | 2 Comment
pre-commit considered harmful if you ask me. prek seems to largely be an improvement but I think it's improving on an already awful platform so you should not use it.
I know I am working on a competing tool, but I don't share the same criticism for lefthook or husky. I think those are fine and in some ways (like simplicity) better than hk.
Show Reply 2 [+]
esafak | 11 hours ago | 3 Comment
Is prek much better?
Show Reply 3 [+]
candiddevmike | 11 hours ago | 10 Comment
Why not just call a shell script directly? How would you use these with a CI/CD platform?
Show Reply 10 [+]
anentropic | 10 hours ago | 1 Comment
The main advantage for me is that prek has support for monorepo/workspaces, while staying compatible with existing pre-commit hooks.
So you can have additional .pre-commit-config.yaml files in each workspace under the root, and prek will find and run them all when you commit. The results are collated nicely. Just works.
Having the default hooks reimplemented in Rust is minor bonus (3rd party hooks won't be any faster) and also using uv as the package manager speeds up hook updates for python hooks.
__mharrison__ | 10 hours ago | 1 Comment
Dedicated a whole chapter to it in my latest book, Effective Testing.
The trend of fast core (with rust) and convenient wrapper is great while we are still writing code.
fishgoesblub | 11 hours ago | 5 Comment
Show Reply 5 [+]
nsm | 7 hours ago | 3 Comment
* CI (I understand pre-commit shifts errors left)
* in editor/IDE live error callouts for stuff like type checking, and auto-formatting for things like "linters".
Do you run tests? How do you know _which_ tests to run, and not just run every test CI would run, which could be slow?
Show Reply 3 [+]
xyzzy_plugh | 10 hours ago | 4 Comment
I loathe UX flows where you get turned around. If I try to make a commit, it's because that I what I intend to do. I don't want to receive surprise errors. It's just more magic, more implicit behavior. Give me explicit tooling.
If you want to use pre-commit hooks, great! You do you. But don't force them on me, as so many projects do these days.
Show Reply 4 [+]
BeeOnRope | 5 hours ago | 1 Comment
This is a long standing sore point in pre-commit, see https://github.com/pre-commit/pre-commit/issues/860 and also linked duplicates (some of which are not duplicates).
thayne | 6 hours ago | 2 Comment
Show Reply 2 [+]
aaronblohowiak | 11 hours ago | 1 Comment
This is the kind of thing I see and I think to myself: is this solving a problem or is this solving a problem that the real problem created?
Why is your pre-commit so complicated that it needs all this? I wish I could say it could all be much simpler, but I’ve worked in big tech and the dynamics of large engineering workforces over time can make this sort of thing do more good than harm, but again I wonder if the real problem is very large engineering teams…
fuddle | 9 hours ago | 1 Comment
rurban | 11 hours ago | 2 Comment
Show Reply 2 [+]
egorfine | 9 hours ago | 3 Comment
Show Reply 3 [+]
teaearlgraycold | 8 hours ago | 3 Comment
Show Reply 3 [+]
WolfeReader | 4 hours ago | 2 Comment
Pre-commit and pre-push hooks serve the purpose of keeping code isolated to a developer's machine. This is a recipe for disaster. You will run into situations where important work isn't accessible since a developer couldn't commit/push their code and the machine was lost or damaged. I've seen it happen.
Show Reply 2 [+]
iFire | 10 hours ago | 1 Comment
evetools | 6 hours ago | 1 Comment
- | 11 hours ago | 1 Comment
BewareTheYiga | 11 hours ago | 1 Comment
ChatGPTBanger | 2 hours ago | 1 Comment
h4kunamata | 6 hours ago | 1 Comment
Is enough to don't even open the link! Everything right now seems to have an urgent need to be developed into Rust, like why???
Just like kubernetes, many companies followed the kubernetes hype even when it was not needed and added unnecessary complexity to a simple environment.
Now it is Rust time!!