Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
First off, all the things @meriton said, I think overall you would be better in a single repository as your docs and code should be changing at the same rate (or should be). Having said that if you...
Answer
#2: Post edited
- First off, all the things @meriton said, I think overall you would be better in a single repository as your docs and code should be changing at the same rate (or should be).
- Having said that if you do have two independent pieces of software which share a common piece of code you would be better to use a package system to bundle and install your shared code. This is language dependent, but examples would be npm (javascript), nuget (.NET), pip (python) etc.
The reason you want a package over a git submodule is that you want each independent repo to be in control of its own build status. For example if a change happens in a git submodule it has a potential to break downstream repos. This sucks. Instead the behaviour you want is for the downstream repos to opt into new versions of the module. This means that if a failure occurs it is initiated by the maintainers of the repo, and at a time where its clear why the failure occurred.- There are some other patterns you can apply to this in really specific situations around requiring consistency but these are probably way more than you need. Heres an article I wrote about this a few years ago https://blog.staticvoid.co.nz/2017/library_vs_microservice/
- First off, all the things @meriton said, I think overall you would be better in a single repository as your docs and code should be changing at the same rate (or should be).
- Having said that if you do have two independent pieces of software which share a common piece of code you would be better to use a package system to bundle and install your shared code. This is language dependent, but examples would be npm (javascript), nuget (.NET), pip (python) etc.
- The reason you want a package over a git submodule is that you want each independent repo to be in control of its own build status. For example if a change happens in a git submodule it has a potential to break downstream repos. This sucks. Instead the behaviour you want is for the downstream repos to opt into new versions of the module. This means that if a failure occurs it is initiated by the maintainers of the consuming repo, and at a time where its clear why the failure occurred.
- There are some other patterns you can apply to this in really specific situations around requiring consistency but these are probably way more than you need. Heres an article I wrote about this a few years ago https://blog.staticvoid.co.nz/2017/library_vs_microservice/
#1: Initial revision
First off, all the things @meriton said, I think overall you would be better in a single repository as your docs and code should be changing at the same rate (or should be). Having said that if you do have two independent pieces of software which share a common piece of code you would be better to use a package system to bundle and install your shared code. This is language dependent, but examples would be npm (javascript), nuget (.NET), pip (python) etc. The reason you want a package over a git submodule is that you want each independent repo to be in control of its own build status. For example if a change happens in a git submodule it has a potential to break downstream repos. This sucks. Instead the behaviour you want is for the downstream repos to opt into new versions of the module. This means that if a failure occurs it is initiated by the maintainers of the repo, and at a time where its clear why the failure occurred. There are some other patterns you can apply to this in really specific situations around requiring consistency but these are probably way more than you need. Heres an article I wrote about this a few years ago https://blog.staticvoid.co.nz/2017/library_vs_microservice/