News for hackers. Stuff that matters.
Re:Monorepoize – Bash scripts for creating a monorepo out of... by stepbeek on Monday April 27, 2020 @05:01AM (#22994159)
> Having separate repos only makes sense if they are maintained by separate teams with a well defined API

Agree! I've found that a multirepo setup only works if there's an obvious boundary. Similar to SOA, distributed monoliths - or distributed monorepos - are problematic.

Re:Monorepoize – Bash scripts for creating a monorepo out of... by cryptica on Monday April 27, 2020 @05:11AM (#22994220)
> Having separate repos only makes sense if they are maintained by separate teams with a well defined API

If some logic is modular then it should be in a separate repo. If it's not modular then it should be part of the same repo; just regular files inside directories... IMO, monorepos try to have it both ways but this doesn't make any sense; it encourages developers to write logic which is "somewhat modular".

But "somewhat modular" is not modular at all. Either it's modular and it can easily be extracted out completely or it's not and then it should be embedded into the project's code.

Code which is not modular should never need to be shared with other projects.

Re:Monorepoize – Bash scripts for creating a monorepo out of... by _se on Monday April 27, 2020 @08:00AM (#22994987)
This is a ridiculous oversimplification that doesn't scale at all to larger orgs. Every modular component in its own repo? That basically means creating a repo for every library. You could easily be managing thousands of repos with negative benefit.

People seem to be afraid of using a single repo for some reason. It's really simple though. You should have one repo per "release cycle" that you have. Anything meant to be deployed together should be in the same repo. Things not meant to be deployed together should be in different repos. With the right tooling, that is what solves most problems.

Re:Monorepoize – Bash scripts for creating a monorepo out of... by bluGill on Monday April 27, 2020 @08:23AM (#22995141)
I have two things that are not deployed together. However there is common algorithms between the two that I'd rather not copy and paste maintain. Mono repo doesn't make sense because there is always something close to release and getting risk adverse (there are legal consequences to some bugs) so nothing can every be updated.
Re:Monorepoize – Bash scripts for creating a monorepo out of... by wwright on Monday April 27, 2020 @08:59AM (#22995367)
The release cycle of that common code is also a big factor.

If your common code changes fairly irregularly, you are correct, monorepos have reduced benefit.

If your common code is as likely to change as anything else, or more likely, then your multirepo setup can begin to incur more cost.

Re:Monorepoize – Bash scripts for creating a monorepo out of... by cryptica on Monday April 27, 2020 @08:41AM (#22995244)
>> Every modular component in its own repo

My original statement was slightly misleading. I meant to say "every modular component which needs to be reused by different projects" obviously I'm not advocating that every class should be in a separate repo; that would be madness. My point is; if it's modular and needs to be reused in different projects, then it should be a separate repo, otherwise, it can just be added as files inside the current project repo; no need to publish those as separate standalone libraries for download. If the component is not modular, then it shouldn't be shared with any other projects.