DEV Community

Discussion on: Do you use a monorepo?

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

monorepo only make sense if all sub repositories are in only one language. And I know only one language doing this, JavaScript.

For JavaScript, all modules are shared, that is, only one node_modules folder, ensuring all dependencies' versions are the same.

Collapse
 
pjeziorowski profile image
Patryk Jeziorowski

I'm not sure if it's true that it makes sense only with Javascript, there are huge companies like Google that use it with multiple languages.

But being such a giant as Google allows you to do crazy things.

I'm curious if in small/medium size projects monorepos are popular only in Javascript ecosystem (if we take only small/medium projects into account, then I agree that only JS makes any sense. I think this is the only language that has any tools for doing this anyway?).

Collapse
 
sebbdk profile image
Sebastian Vargr • Edited

I think i can see were you are coming from but,
lets look at some stories to explore this more. :)

  • As a developer i want to pull 1 repository and then i expect to have all the necessary first-party code available to run a given project.
  • As a developer i would expect to change first-party code within a project without having to consider version matching it with other first-party parts.
  • As a developer i want to be able to write integration test between first-party parts without having to manage parts versions.
  • As a developer when i make a PR with a feature i would expect all the changes to be in that PR.

Imagine a stack with a C# API server or headless CMS, a couple of FE's intended for different user groups, like end-user or admin.

Add in some machine learning , written in Python that the C# needs to interact with occasionally.

Very quickly, monorepo starts to become the only way, i can think of, that handles these stories. :)