I have several projects that build reusable libraries. All these projects are under source control.
When I use these libraries in a project I simply link to the same ONE version on my local drive. However as you can imagine, this can cause problems when I commit back, and a different developer tries to clone the repository.
What is the best practice when using components also under source control? Should I include the "library projects" in the "main project" source control? Will this cause problems?
NB: The libraries take quite a few compiler directives so its almost impossible to just compile a static version and link to that. Plus I'm still developing them in parallel.
You have two main kind of dependencies:
If, when you say "I use these libraries in a project", you mean you need the binaries in order for your project to compile, then you could store said binaries in an external repository (i.e. not a (D)VCS like Mercurial, but an artifact repository like Nexus)
But if you mean you need to include sources, because you are also making some evolutions to those libraries while using them to develop your project, then Mercurial subrepos are a better fit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With