On Mon, 21 Oct 2013 12:55:51 GMT, Sönke Ludwig wrote:
On Mon, 21 Oct 2013 12:36:44 GMT, Lemonfiend wrote:
I don't have a C/C++ background, and have always used rdmd with ie. -I/path/to/derelict.
So the dub build process is a bit foreign to me.
When using dub, if I ie. select derelict-util as a dependency, it will first compile derelict-util to a lib, and include the entire lib in my project exe?
Or would it first collect the files needing compilation and compile only those?
Or something else?
The current situation is similar to rdmd (in fact, by running "dub build --rdmd" it will actually use rdmd quite like you did before).
Similar, but not the same :) The reason I like rdmd so much is that it does not insist on building all files, even unused/unimported files (ie. broken wont-compile in-progress files), unlike typical dmd solutions.
It will go through all dependencies and collect the source files. Those source files are then all compiled together to form the final binary.
Ah I see, great! I'll use the --rdmd flag then.
However, the plan is to go towards per-package builds, where each dependency is built (and cached) separately and everything is linked together in the end. See also https://github.com/rejectedsoftware/dub/wiki/Separate-compilation-and-caching-of-dependencies for some details.