On Thursday, 4 February 2016 at 00:50:43 UTC, Tofu Ninja wrote:
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
Actually, nvm, wouldn't actually work because as soon as you add
an import derelict.opengl3.gl3; it would error out because it
cant find the file and it wouldn't print the dependencies.