4 ms·
What tools are people using to manage multiple repos? A search reveals many, but what is the latest and greatest?
by amelius 8y ago
What tools are people using to manage multiple repos? A search reveals many, but what is the latest and greatest?
- pjmlp 8y agoNuGET, Maven, whatever is the package manager for the language in question. The outcome of multiple repos should be modular libraries.
- Cthulhu_ 8y ago> The outcome of multiple repos should be modular libraries. Yes; also they should all be treated as separate, independent products. Where multi-repos go wrong is when a whole product spans multiple repos, and a feature of the product depends on features being added or altered in multiple projects. Ideally, the split should be so that nobody has to work across multiple repos to finish a feature. The github / NPM ecosystem is IMO a good way to look at it; libraries that are all independent of one another who have a (usually pretty good) adherence to semver.
- amelius 8y ago> Ideally, the split should be so that nobody has to work across multiple repos to finish a feature. That does not sound realistic. Often I have to add a new function, and I think: where (in what library) does this function belong, and very often it's not the main library I'm working in at that moment.
- lmm 8y agoAdding a new function anywhere other than the leaf project where it's used is premature. Organize around user-facing functionality. Pull out common libraries as and when you have something common enough to factor out (and, crucially, test independently), not before.
- jacques_chester 8y agoSo the answer to needing to open multiple PRs is to open multiple PRs.
- lmm 8y agoThe answer is to adapt your working patterns so that you never have multiple PRs on the critical path. Long-term codebase quality may require multiple PRs, but delivering user-facing functionality doesn't.
- amelius 8y agoAnd what if I wanted to add a method to a class? Or a method and a data member?
- pjmlp 8y agoYou get the library owner team to do it and bind to the new released version. Microservices without network headaches.
- pjmlp 8y agoUsually libraries are owned by separate teams.
- Orphis 8y agoUnless you're a library vendor, the outcome of multiple repos is most likely a single final application. Or a few applications.
- pjmlp 8y agoThat is not a reason not to write modular code.
- jacques_chester 8y agoModular code works just fine in subdirectories.
- pjmlp 8y agoNot when it gets compiled from scratch all the time, or is open to spaghetti code modifications. Modular code in subdirectories is what gave microservices an excuse against the "monolith".
- bluGill 8y agoIt can work either way. There are pros can cons to both ways, code organization needs to be done correctly either way. Nothing about either ensures your code is a good modular structure vs a haphazard mess. In most cases code in fact has a modular structure behind it that is followed - but the structure is not always good (something that is easy to see in hindsight, but the wrong rules were put in place early and now it is hard to change) Mono repo makes violation of modular rules easier, just link it in - in a complex project odds are nobody will notice. However this doesn't mean monorepo is bad, it just needs that you need to be careful to ensure the rules are written down. Multi-repo makes violation of those same rules harder - you have to make a bunch of changes to ensure that the bad dependency is in the environment. This hints at the downside of multi-repo: you need to have some sort of dependency management system to ensure that the right version is there when you build.
- ivan_gammel 8y ago
- amelius 8y agoSounds good in theory, but I'm wondering: your edit-test cycle now becomes edit-install-test?
- pjmlp 8y agoSurely, on the QA server as CI/CD pipeline.
- oblio 8y agoNot necessarily. With Java IDEs, if you have the sources you can usually modify those and the IDE knows to ignore the package manager dependencies.
- oblio 8y agoTo the downvoter: https://stackoverflow.com/questions/10688344/in-eclipse-m2e-how-to-reference-workspace-project https://stackoverflow.com/questions/10688344/in-eclipse-m2e-...
- detaro 8y agoDepends on the environment you're working in, but generally: interpreted languages typically have no problem loading a package from a temporary dev-location, compiled languages have build systems that handle that.
- aldanor 8y agoconda is not bad as a generic package manager for this sort of stuff (packages don't have to be Python although that's what it was initially aimed at).
- amelius 8y ago> NuGET, Maven, whatever is the package manager for the language in question. Sometimes a repo contains code written in multiple languages.
- pjmlp 8y agoMaven, NuGET among other package managers happen to support multiple languages.
- bluGill 8y agoWe wrote one in house, it works well and has useful features that nothing else has. Today I'd use conan.io, and add those useful features to that project. Our internal system works well so it is hard to find justification to tear it out, but the downside is no tool/IDE understands it, and so you can't use your favorite IDE unless your favorite IDE is the one obsolete version that we have modified to understand our tool.
- zb 8y agoZuul (https://zuul-ci.org/ https://zuul-ci.org/) is an open source CI/CD system that does speculative execution of CI on changes across multiple repos. So if you have a change in one repo that depends on a change in another, you can test both together before merging either (and it enforces merging in the correct order). IME it solves the same problem that monorepos are intended to solve, but without any of the downsides.
- ivan_gammel 8y agoWhat's more, same result can be achieved with practically every modern CI server with minor admin effort.