dub and hierarchies of packages
Guillaume Piolat via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jul 26 08:10:12 PDT 2017
On Wednesday, 26 July 2017 at 14:05:09 UTC, Jean-Louis Leroy
wrote:
> I have a package hierarchy (here
> https://github.com/jll63/openmethods.d/blob/master/dub.sdl) and
> I would like to 'dub run' or 'dub test' everything. Is there a
> recursive mode that I've missed?
I don't think there is one. But would be useful!
> Secondly, I have buildTypes that I would like to use in all the
> packages (like here
> https://github.com/jll63/openmethods.d/blob/master/tests/misc/dub.sdl#L9). I would like to avoid repeating it in every dub.sdl. I tried putting the buildTypes in the root dub.sdl and defining my subpackages there (in spite of the warning against doing that) in the hope that the buildTypes would be globally available, but no. Is there a way of making the subpackages inherit stuff from their parent? Or some sort of sdl #include or 'import'?
I think in DUB packages inherit flags from their dependencies
when --combined is used. You could maybe use a fake dependency to
insert the right "dflags" or "versions" for your particular build
type.
Something that also changed in the past is adding the new build
type to DUB in the case it's a generic enough need.
More information about the Digitalmars-d-learn
mailing list