Am 18.02.2013 21:49, schrieb Andrej Mitrovic: > On 2/16/13, Sönke Ludwig <[email protected]> wrote: >> http://registry.vibed.org/ > > Why does dub automatically try to build an executable? I wanted to > create a library package but I don't see from the docs how to do this. >
The current concept is to view all libraries as source libraries for various reasons: - No ABI compatibility btw. different compiler vendors/versions - Different version statements/compiler flags of the main project or any dependency may require a recompile anyway - Compilation times are so much faster than C++ anyway that the question is if there is any advantage in most cases Closed source projects are different in that regard though and it probably makes sense to add library builds anyway. That said, "dub generate visuald" currently creates a project per dependency and builds them as a static library, but that's just a special case. > I also think it's counter-intuitive that running dub with no arguments > will autobuild the project, this should be a a separate 'build' > command. > Just running "dub" implies "dub run" so that it is quick to run a project during development. Of course it could also do nothing, but that would waste an opportunity to do something useful with only four keystrokes. But there is also "dub build" and "dub run" to make that explicit (it should be mentioned in the help screen that "run" is the default, though).
