One Repo to Rule them All?

Posted by Tejus Parikh on May 21, 2012

For the longest time our projects were setup in a mostly canonical maven way. Each module was separated into multiple sub modules. Each top level module got its own source-control repository.

The initial idea was each module was its own thing and our lives would be easier if we could version each project independently.

Reality did not match up with that thought. Our features and functionality grew along with the pace of our major releases. The once separated modules became developed concurrently as they call communicated with each other. To manage the maven tree, we have to either use SNAPSHOT everywhere or version everything. Each of those solutions have problems.

I’ve never had to manage this much source code changing this fast, so I could use some advice. I think the best solution would be to merge all the individual repositories into one repo. In my head, these are the pro’s and con’s I can think of:

Pro:

  • All source code is managed globally across all projects, allowing for coherent feature branching
  • With a guaranteed source tree layout, we can write tools to manage maven that will work for all developers
  • A developer can get back to the state of any arbitrary build. This could be crucial for rebuilding production artifacts for a damaged system

Con:

  • We can no longer tie specific modules to specific dependencies. Changing a core library will effect everything.
  • We lose some access control. We may not want contractors working on core code, but only the Web front end.
  • Similar to above, but developers will be forced to check out everything. With the wrong VCS, downloading branches and tags could be very expensive.

What I’d like to know is what else am I not thinking of? Has anyone else had some experience they’d like to share? Please leave a comment or send a tweet @vi_jedi.

Tejus Parikh

I'm a software engineer that writes occasionally about building software, software culture, and tech adjacent hobbies. If you want to get in touch, send me an email at [my_first_name]@tejusparikh.com.