So at my current job we have multiple projects with each one having all of it's code contained within a single repository. The projects all use a large amount of shared code, wrappers for 3rd party services and various utilities, and up until this point we've simply just copied the shared code from the last project into the new one. This is absurdly bad practice, since we end up with large amounts of slightly different branched code, since we occasionally go back and make modifications, and this is already annoying to manage, and I feel bad for whoever poor dev tries to maintain this is the future, especially if that poor dev is me.
Which brings me to now, we have a slight lull between projects and I've been looking at extracting out all the shared code to a common centralized repo/repos, so it can all be maintained in the same place and should make everything easier.
Now that feels like it should be fairly simple, but leaves me with a problem I couldn't find much advice on, what is best practice for dividing utilities into separate packages and repos? Simplest would be to just put any shared code in one big package/repo, which would currently work, but in the future would lead to weirdness where if I want to use some generic utility code, I would also have to involve a bunch of domain specific wrappers and such which very likely wouldn't be relevant. So Overall I feel like my options are;
-
One big package/repo for shared utilities, which has the problem above
-
Two big repos, one for purely generic utilities, one for more project specific wrappers, which would be my go too, but there is currently circular dependencies between the groups of packages if I set them up that way, so that would not work
-
As few repos as I can while avoiding circular dependencies, this would work, but then defining the actual packages would feel weird, since utilities would be mostly grouped together based on shared dependencies rather than "theme"
-
One package/repo per individual specific utility, this seems like the best solution but means that I'll have to manage possibly dozens of packages/repos, which sounds like a pain, but might be a bullet I'll to bite/figure out how to automate.
Any thoughts would be appreciated, thanks in advance!
submitted by /u/unua_nomo
[link] [comments]
from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/zSwVk8G