Monorepo vs polyrepo #471
hannobraun
started this conversation in
Ideas
Replies: 1 comment 8 replies
-
I couldn't agree more. If you go monorepo, releasing everything at the same time with the same version takes the pain away. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an idea, and I'm wondering what people think about it. I'm interested in @hendrikmaus's opinion, specifically.
I just did a release of
threemf
, and while it was not a big deal, there was more friction than I would have liked. Figuring out what I have to set up to get automatic merges to work took alone took a few minutes, interrupting the work I was actually going to do multiple times.As I said, not a big deal. But it's a sign of what's to come, if start to move crates out of the repository, as we talked about in #104. That's why I like the monorepo approach. Set things up once, no needless friction from then on. However, I said before that there's a trade-off, as monorepos start becoming cumbersome, once you have crates with different release cycles in them. I still think this is true.
So here's my idea: Keep everything Fornjot-related in a single monorepo, and force all crates to have the same release lifecycle. Do one release of all Fornjot crates at the same time. That could mean we publish version
0.{x+1}.0
(or later{x+1}.0.0
) of a crate, even though it had no breaking changes. Or in the extreme case, no changes at all.The disadvantage is potential churn in the ecosystem. You might have multiple versions of the same dependency in your dependency graph, which could even result in build errors in your own code, even though all dependencies could use the same version without changes required. (Although, if no changes are required, upgrading those dependencies is going to be trivial.)
However, besides us getting to have a monorepo, there is one other big advantage: It's simple. If you use multiple Fornjot crates, you always know that you need all of them at the same version, and that's it. No wondering about which
fj-kernel
version works with whichfj-interop
version works with whichfj-graphics
version. You always just know, at a single glance.I think this is a big advantage. It might be the right trade-off, even if we take the monorepo question out of the equation.
I'd love to hear what people think! Right now I'm leaning towards just implementing that scheme, then re-evaluate later, if it causes problems.
Beta Was this translation helpful? Give feedback.
All reactions