Speed up `dub`.

cy via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 14 18:48:41 PDT 2016


On Monday, 7 March 2016 at 09:18:37 UTC, ciechowoj wrote:
> I'm using `dub` to build project. And every time I run `dub` it 
> seems to check if dependencies are up to date, which takes some 
> time. Is there a way to switch of that checking? Or any other 
> way to speed up building process? It really slows down my 
> modify-compile-check iteration time.


dub build --nodeps

It's amazing.

dub has a few uh, issues with dependencies. It pulls all 
dependencies, even for disabled configurations, even for 
unselected optional dependencies, then just... leaves them pulled 
I guess, and doesn't link with them?
https://github.com/dlang/dub/issues/844

I don't know exactly what's going wrong. But after you run `dub 
build` the first time, everything will be downloaded and 
installed now, so you can recompile by specifying --nodeps and it 
just jumps straight past all those buggy issues.

ld.gold also will vastly speed up modify-compile-check cycles. 
dmd is fast at compiling, but linking it all up is really slow 
with vanilla ld.


More information about the Digitalmars-d-learn mailing list