Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have code that represents the interface for a library that is used by a variety of internal clients. How should that interface code be exposed to these internal clients that live in different source control repositories?

The interface should be relatively stable, but is in development (as is most of the internal clients) so keeping changes communicated is important, as is keeping breaking changes to a minimum. Normally, I would just directly reference them in the other modules but the separated nature makes that troublesome.

share|improve this question
    
Git allow a folder to be managed by a different, independent instance of git, using git submodule. You might be looking for something similar in your version control. –  Lie Ryan Jul 31 '12 at 0:13
add comment

1 Answer

There are multiple ways and it really depends on your library/setup.

Typically you can reference other repositories, e.g. with submodules for git or for example externals and svn. This is the simplest and probably also hackiest solution as you are directly referencing to the library and your clients would have to build them as well.

You can provide binary packages for your library, e.g. gems/eggs/debs/rpms/… and just reference it from your build process or assume it is present at runtime. This is in my opinion a quite clean approach.

Let your buildsystem handle the dependencies, e.g. rely on maven or use other tools like bundler/carton/openembedded or other similar tools for your language. They can automatically download and build your dependencies.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.