Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to version control the build tools and libraries?

What are the recommendations for including your compiler, libraries, and other tools in your source control system itself?

In the past, I've run into issues where, although we had all the source code, building an old version of the product was an exercise in scurrying around trying to get the exact correct configuration of Visual Studio, InstallShield and other tools (including the correct patch version) used to build the product. On my next project, I'd like to avoid this by checking these build tools into source control, and then build using them. This would also simplify things in terms of setting up a new build machine -- 1) install our source control tool, 2) point at the right branch, and 3) build -- that's it.

Options I've considered include:

  • Copying the install CD ISO to source control - although this provides the backup we need if we have to go back to an older version, it isn't a good option for "live" use (each build would need to start with an install step, which could easily turn a 1 hour build into 3 hours).
  • Installing the software to source control. ClearCase maps your branch to a drive letter; we could install the software under this drive. This doesn't take into account non-file part of installing your tools, like registry settings.
  • Installing all the software and setting up the build process inside a virtual machine, storing the virtual machine in source control, and figuring out how to get the VM to do a build on boot. While we capture the state of the "build machine" with ease, we get the overhead of a VM, and it doesn't help with the "make the same tools available to developers issue."

It seems such a basic idea of configuration management, but I've been unable to track down any resources for how to do this. What are the suggestions?

like image 764
esilver Avatar asked Sep 22 '08 22:09

esilver


2 Answers

I think the VM is your best solution. We always used dedicated build machines to get consistency. In the old COM DLL Hell days, there were dependencies on (COMCAT.DLL, anyone) on non-development software installed (Office). Your first two options don't solve anything that has shared COM components. If you don't have any shared components issue, maybe they will work.

There is no reason the developers couldn't take a copy of the same VM to be able to debug in a clean environment. Your issues would be more complex if there are a lot of physical layers in your architecture, like mail server, database server, etc.

like image 94
Cade Roux Avatar answered Nov 15 '22 11:11

Cade Roux


This is something that is very specific to your environment. That's why you won't see a guide to handle all situations. All the different shops I've worked for have handled this differently. I can only give you my opinion on what I think has worked best for me.

  • Put everything needed to build the application on a new workstation under source control.
  • Keep large applications out of source control, stuff like IDEs, SDKs, and database engines. Keep these in a directory as ISO files.
  • Maintain a text document, with the source code, that has a list of the ISO files that will be needed to build the app.
like image 28
Hector Sosa Jr Avatar answered Nov 15 '22 11:11

Hector Sosa Jr