Vision for the first semester of 2016

Tofu Ninja via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed Feb 3 17:23:14 PST 2016


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
> 	version(Dub_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.


More information about the Digitalmars-d-announce mailing list