On Saturday, 18 March 2017 at 13:41:12 UTC, Mike Parker wrote:
On Saturday, 18 March 2017 at 12:49:33 UTC, alex1974 wrote:


This simple layout works, but then all parts will be compiled every time. Is there a way to just compile the "sublibraries" which have changed?

By "compiled every time", if you're talking about when using the library as a dependency, that's not quite true. dub will compile dependencies on the first run, then only in specific scenarios, not every time. It's really not a big deal. Take a look at dlib [1], for example. On big monolithic library and I haven't seen anyone complaining.

But if you really want to, take a look at subpackages[2] in the dub docs.

[1] https://github.com/gecko0307/dlib
[2] https://code.dlang.org/package-format?lang=json#sub-packages

Actually the compiling is fast. But its confusing, that all unittests from all sublibraries are performed every time. I thought with subpackages I can perform just the test from the part I'm working on.
But I can't get the right layout for the subpackages.

Reply via email to