3 ms·
I've worked in a few monorepos, and organize my personal projects into a monorepo. The most common tool I have seen to manage them (and what I use for my person
by lbhdc 2y ago
I've worked in a few monorepos, and organize my personal projects into a monorepo. The most common tool I have seen to manage them (and what I use for my personal stuff) has been bazel.
The first monorepo I worked in was a python/typescript monorepo. It largely grew organically, and was heavily iterated on. We had no tooling to manage the complexity, and constant bumped into sharp edges that made life difficult.
- Dependencies change and silently break applications or developer environments.
- Figuring out how to start up applications you didn't work on could be difficult because you needed to figure out the tool chains and how to invoke them. This painpoint came up everytime toolchains changed.
- Figuring out where dependencies were used was really hard. This lead to lots of zombie code, we weren't sure if it was alive or dead.
There are a bunch of 'meta' tools for this, bazel, pants, buck, gradle, etc. Professionally I have only seen bazel used. I suspect its less to do with the tools themselves, but more to do with the ecosystem.
With that being said, bazel does seem to solve most of the sharp edges we had with our ad-hoc/no tooling, but it comes at a cost. Bazel is not trivial, and won't allow you to do some things that the underlying toolchain might have been okay with. So that may leave you making code changes to fit inside bazels constraints.
Bazel tooling also isn't equally mature across all languages. The go tooling is pretty mature, and there are great generators that 'make things work', the situation for frontend is less mature, but getting better. It will add additional friction that webdevs might not love.
At the end of the day though, I would choose to use something like bazel (or one of the alternates), and the friction it brings over not having it.
Example bazel frontend. https://github.com/bazelbuild/examples/tree/main/frontend/next.js https://github.com/bazelbuild/examples/tree/main/frontend/ne...