2

1

Subrepositories allow us to tell the version control system of our dependencies so we don't need to manage version manually. However, with compiled languages and large enough systems, you would want to use prebuilt version of those dependencies instead of checking out the code and building it.

Anyone has tried to do this and integrate with a continuous integration server's builds to switch between prebuilt VS sources in a project dependent way? I'm thinking of writing an extension that would allow us to associate a built executable to a certain revision of the code in the repository. Checking out the subrepository could then obtain prebuilt dependencies instead.

It is still a bit fuzzy, but I was wondering if my requirement is unique to me. Is there any existing solution for this?

flag

1 Answer

1

We generally favor not doing this at Fog Creek, because it becomes too easily to accidentally end up in a state where you can no longer rebuild a dependency and need to add a bug fix. That said, we completely recognize that, if you have a large number of dependencies, the benefits outweigh the cons here.

If you were going to do this, though, there seems to be a really easy way to do it: modify your build scripts so that they check for the existence of a file named after the reference version in the .hgsubstate file on a centralized server. I.e., in pseudocode:

if not_built(project):
   file = '\\' + build_server + '\build_results\' + version_in_hgsubstate() + '.zip'
   if exists(file):
       get(file)
       unzip(file)
   else:
       build(project)

The best part of this kind of design is that it doesn't even matter whether the file's there or not. If it is, it'll get used. If it's not, it won't.

link|flag

Your Answer

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