What is the preferred dependency shape for (very) large multi-project setups? #7158
Replies: 1 comment 5 replies
-
That's an interesting question and I don't have a definitive answer for you. I would not suspect the deepness of I know a project that contains 200+ projects, and 200.000+ settings, lots of projects with about 1 or 2 layers of It would be useful to know what is taking so long to load in your project using a CPU profiler such as async-profiler and Flame Graph visualization. Also do you use a recent version of sbt? |
Beta Was this translation helpful? Give feedback.
-
At one of my clients we're reaching the limits of what sbt can handle (or so it seems). We have a monorepo that contains 1 big sbt project with 150+ sub-projects/modules, besides several other non-sbt projects (frontend stuff).
sbt has 175.000+ settings, and takes about 3 to 5 minutes to reload when ppl are switching branches and/or updating the build.sbt (updating dependsOn or updating libraryDependencies).
There are very many sub-projects, each with
dependsOn
to 5 to 10 other sub projects (with a lot of overlap - most of them depend on the same sub-set of projects). Each sub-project can add to itslibraryDependencies
, but always (99% of the cases :| ) to the same version of external libraries.We do not do cross-version builds.
What is the preferred way to structure such a large sbt project (ours currently is both wide AND deep):
dependsOn
dependsOn
What are the ballpark limits on number of sub-projects and depth of
dependsOn
to keep an sbt project manageable on macbook pro 16Gb.I'd appreciate pointers to resources that explain appropriate ways to (re)structure big sbt projects.
Beta Was this translation helpful? Give feedback.
All reactions