2026 Jul 171 min read

Trim your dependencies

Mitchell was saying to fork and trim your depdendencies.

https://x.com/mitchellh/status/2057171518027887035

Initially, I was quite skeptical about this, and didn't like the idea.

However, I gave it a try, and there were few things that are worth noting:

  • some of my apps had dependencies where we used 5% or less of the code from dependency, but the dependency itself was huge. So checking their code, have AI write some tests for the APIs that we were using, and copying and adapting their code was HUGE win
  • Just forking the dependency is a bit tricky - how do you maintain sync/updates/bug-fixes with the original lib/repo