Software Development with Linux

Compilation as a test

MON, 16 DEC 2013

A recent discussion in the Agile and Lean Software Development group on LinkedIn started with the question, Do we loose agility with a long build time?

While most of the discussion was around the pros and cons of using language that don't have to be compiled or why people do not want to put the time it takes to improve their existing build system, I think one thing overlooked was : why do people consider compilation as anything but a special test case?

If you consider that compilation and building steps are actually (mandatory) tests, then all the usual thinking you have about test length apply. Do you have a single big test that test everything each time you change a single line of code? Obviously no. Do you think it is valuable to cut tests into smaller pieces and execute only those that apply to a change instead of the whole lot every time? I do and you probably think the same.

In that case, why are you allowing to have a big compile time every time you change a single line of code? All the build systems (that I know of, that is) allow for good dependencies tracking and conditional compilation, so the tools are already available. So if the compile and build time is too long for your software development method, attack that like a big test you have to run and chunk it into acceptable pieces. This have been done for many years now already, so take the couple of hours you need to learn your build environment and compilation tools, and do it the right way.