dub optional dependency

ikod geller.garry at gmail.com
Sat Oct 28 19:23:42 UTC 2017


Hello,

I have dub.json with two configurations:

        "configurations": [
                 {
                         "name": "std",
                         "targetType": "library"
                 },
                 {
                         "name": "vibed",
                         "dependencies": {
                                 "vibe-d": {"version": "~>0.7"}
                         },
                         "targetType": "library",
                         "versions": [
                                 "vibeD"
                         ]
                 }
         ],

So default version is "std", I can build it w/o vibe-d, but dub 
anyway fetch  vibe-d.
I'd like dub fetch vibe-d only when I build with --config vibed.

I know about "optional": true, it prevent dub to fetch vibe-d for 
"std" config, but it also prevent it from fetching for --config 
vibed.

Thanks for any help.



More information about the Digitalmars-d-learn mailing list