Tuesday, April 25, 2006

Keeping track of versions of internal libraries

We've got several applications, each in several versions. We've got several internal libraries, with their own versions. Because it was starting to get a bit harder to keep track of what version of an application requires what version of each library, we now have a solution.

Each library now has a class called Version. This class has one static void method called version_n_n_n() that does nothing, with the 'n's reflecting the version of the library. In the applications, a method early in the call chain (i.e. the constructor of an MVC controller) makes the calls.

When the library version gets bumped, we create a new branch in Subversion, and the method gets renamed. Any code that depends on a newer version of the library also gets updated to call the new method.

The big benefit here is that anyone who hasn't pulled down the new library versions, but gets the latest app code, gets immediate and obvious compile errors, and knows to get the updated libraries.

0 Comments:

Post a Comment

<< Home