I tried to start to use Dub for one of my project and noticed a problem. Dub builds all files in one go. This leads to a couple of problems:
Compiler flags are applied to all files when they in fact should only be applied to a limited set of files (those of a project)
Require linking of functions not actually used. An example of this is Tango which depends on zlib. But when Tango is built as a static library
those functions are only pulled in to the executable if they're used in the executable. Since Dub builds all files in one go they will always be
pulled in to the executable, regardless if they're used in the code or not
It would be better if Dub compiled each package separately, then link everything together.
I guess the first issue not as big issue but the second issue is a blocker for me.
I will not link with zlib when my application doesn't require it. Is there a workaround?