On Wednesday, 3 February 2016 at 23:35:21 UTC, Tofu Ninja wrote:

Actually now that I think about it, you can do with out the pragma and just define something like this...

mixin template DubDependency(string dependency, string vers)
        // Does nothing but print a dependency
pragma(msg, "DubDependency: \"" ~ dependency ~ "\" \"" ~ vers ~ "\"");

Then whenever you need it you just put:
mixin DubDependency!("derelict-gl3", "==1.0.12");

And to get the dependencies for a file you can just do
dmd test.d -o- -version=Dub_Dependency

Reply via email to