Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've worked in places where we depended on external repos (Maven, Gradle, other Ivy-based things) and places where all code has to live in a mono-repo.

Thus far I've preferred the mono-repo mostly for dependency management reasons. Whether you have a lot of internal dependencies or external dependencies, you get similar benefits: - All the changes to internal dependencies are in your revision history, across the company. Shared internal library upgrades are picked up quickly and propagate throughout applications with low delay.

- It's easier to have shared versions of external dependencies "automatically" instead of establishing policies that need a human to enforce. This makes it easier to roll out new versions and bug fixes.

- It's easier to do system-wide improvements in code quality. Replacing common bad code with better implementations is something I've seen across code bases at both Google and Twitter and they have been beneficial.

I think nobody should be trying to implement a system like this if you've got fewer than ~600 SW engineers, though. Small groups don't have as much drift or system-wide refactorings that give you benefit.



At Expedia, we were a gigantic perforce repository, but the trend has moved to hundreds of smaller repositories and applications hosted in enterprise github.

Package management is simple, we push common packages into sonatype nexus with semantic versioning.

Personally I prefer strong versioning and allowing teams to upgrade common libraries at their own pace, but we've had a few times where we needed to quickly upgrade every repository (i.e., a security patch).

You have a few options:

1. You can unpublish the old dependency, breaking all builds until they upgrade. (Frowned upon)

2. You can write a script that identifies all repository owners that depend on you and send out a upgrade by X date email.

3. You can script pull request creation and submit hundreds of pulls to upgrade the dependency.

So far, things have worked out well, and I never want to go back to the monorepo.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: