Hacker News new | ask | show | jobs
by marginalia_nu 746 days ago
> At this point I almost weekly have to review the full context on a pr to make sure my fix won’t break some historical use case that isn’t immediately obvious.

I'd argue tests are much better to guard against accidentally breaking contracts, since they can tell you when that happens, and even why it's important that it doesn't. If that doesn't work, code comments are also good, since they are immediately attached to the relevant code, even if it's refactored and moved elsewhere. "// this looks wrong but " is pretty common in my code.

Warnings in commit messages may be irrelevant, and the deprecation notice may not appear in the same "git annotate".

Especially for projects with any sort of longevity, the commit log is an awfully large haystack to keep such important needles in.