• OsrsNeedsF2P@lemmy.ml
    link
    fedilink
    arrow-up
    13
    ·
    edit-2
    4 months ago

    We use them at Meta. It’s easier to interact with other parts of the codebase, but it doesn’t play well with libraries so you end up redoing a lot of stuff in-house.

    I would only recommend a monorepo if you’re a company with at least 5,000+ engineers and can dedicate significant time to internal infra.

    • lysdexic@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 months ago

      I would only recommend a monorepo if you’re a company with at least 5,000+ engineers and can dedicate significant time to internal infra.

      It’s funny because at least one FANG does not use monorepos and has no problem with them, in spite of being at the same scale or even perhaps larger than Facebook.

      I wonder why anyone would feel compelled to suggest adopting a monorepo in a setting that makes them far harder to use and maintain.

        • lysdexic@programming.dev
          link
          fedilink
          English
          arrow-up
          3
          ·
          4 months ago

          I don’t think they did an exceptional job keeping teams separated. In fact, I think monorepos only end up artificially tying teams down with an arbitrary and completely unnecessary constraint.

          Also, not all work is services.

      • OsrsNeedsF2P@lemmy.ml
        link
        fedilink
        arrow-up
        5
        arrow-down
        1
        ·
        4 months ago

        Updating a library in a monorepo means copying it all over and hoping the lib update didn’t break someone else’s code. Whereas updating a library normally would never break anything, and you can let people update on their own cadence

        • LyD@lemmy.ca
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          4 months ago

          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?

          • OsrsNeedsF2P@lemmy.ml
            link
            fedilink
            arrow-up
            4
            ·
            edit-2
            4 months ago

            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.