this post was submitted on 18 Jul 2024
39 points (91.5% liked)

Programming

17000 readers
94 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
 

I just finished watching Why Google Stores Billions of Lines of Code in a Single Repository and honestly, while it looks intriguing, it also looks horrible.

Have you run into issues? Did you love it? How was it/

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 month ago* (last edited 1 month ago) (1 children)

I set up a monorepo that had a library used by several different projects. It was my first foray into DevOps and we had this problem.

I decided to version and release the library whenever a change was merged to it on the trunk. Other projects would depend on one of those versions and could be updated at their own pace. There was a lot of hidden complexity and many gotchas so we needed some rules to make it functional. It worked good once those were sorted out.

One rule we needed was that changes to the library had to be merged and released prior to any downstream project that relied on those changes. This made a lot of sense from certain perspectives but it was annoying developers. They couldn't simply open a single PR containing both changes. This had a huge positive impact on the codebase over time IMO but that's a different story.

How is it done at Meta? Always compile and depend on latest? Is the library copied into different projects, or did you just mean you had to update several projects whenever the library's interfaces changed?

[–] [email protected] 5 points 1 month ago* (last edited 1 month ago) (1 children)

At Meta, if it's an internal library, the team that maintains it updates all the code to use the latest version (that's the advantage of a monorepo). As an aside, if your project broke because someone else touched your code, that's on you for not writing better tests.

If it's an external library, it either has a team responsible for it that does the above, otherwise it probably didn't get updated since the day it was added.

[–] [email protected] 1 points 1 month ago