On Fri, 21 Mar 2014 12:27:12 GMT, Stephan Dilly wrote:

we want to push our dub packages building to our internal CI system (jenkins) the problem i am encountering now is, that dub uses a ./dub folder to cache dub packges in the user folder. AFAIK i cannot specifiy to use a local path to do that right ?

but the problem is, that multiple independant build jobs could be running and therefor interfering with each other on the local caches.

also i always want it to dub upgrade but since this somehow fails regularly due to alleged local changes that no one made i need to be able to rm the ./dub the hardway befor rebuilding. that makes the problem worse, since I could be interfering with another running build job using that shares cache folder..

what is the workflow supposed to be like in such a case ?

Multiple build jobs at the same time are indeed an issue, but I'd usually avoid that for the fact alone that a compile run can take up a lot of RAM (but of course some additional GBs of memory can easily fix that). A possibility to get this working is to set up an isolated environment for each build job. In the extreme case this would be a chroot environment, but it should also work by putting all of the code, including the dependencies, into a separate folder for each build and then setting the DUBPATH environment variable to this folder. It will then prefer the packages in that folder and put intermediate build results in there instead of into the user-wide package cache.