News for hackers. Stuff that matters.
Re:Monorepo Support by hk1337 on Saturday September 17, 2022 @12:48PM (#32878942)
I found that treating each directory as its own separate application or package is helpful. If you need to share resources between multiple apps/packages, use your dependency manager, most of them seem to have some sort of way to use local packages.
Re:Monorepo Support by echelon on Saturday September 17, 2022 @12:52PM (#32878987)
Exactly! Frontend, backend, or desktop monorepo structure for Java, Rust, Typescript, etc:

  /src
    /lib
      /mysql-common
      /redis-common
      /...
    /services
      /app-1
      /app-2
      /...
You can use other directories to group assets, database migrations, documentation - whatever. The core build, test, CI, etc. tools can live in the root.

The ability to share common code and not have to worry about packaging internal libraries, versioning them, and rolling out updates n-many times is a game changer.

Re:Monorepo Support by hk1337 on Saturday September 17, 2022 @12:57PM (#32879036)
And if an app/package did grow to the point it needed its own repository, all the packages depending on it just need to update their dependency configuration to the new source.
Re:Monorepo Support by echelon on Saturday September 17, 2022 @01:10PM (#32879159)
The most typical case of this happening I've seen is an ancient unsupported legacy app. You still need to deploy it, but you only build it every few months or so. You rarely touch the thing, and its dependencies are pinned to old versions. The lack of support tends to drag down the rest of the monorepo, so it'll sometimes get "kicked out" as a bad citizen.

Really only reserved for the worst cases.