dub optional dependency

Mike Parker aldacron at gmail.com
Sun Oct 29 03:26:14 UTC 2017


On Sunday, 29 October 2017 at 01:55:22 UTC, evilrat wrote:

>
> This is dub design choice, optional requires manual 
> fetching(dub fetch 'package'). I don't see other options, but 
> you can try hack this using 'preBuildCommands' by adding dub 
> fetch. Of course this defeats the purpose.

No, they don't need to be manually fetched. Optional packages are 
downloaded when they are specified in the dub.selections.json 
file.

>
> Isn't it possible to put dependencies in specific configuration?

What the OP wants is to have dependencies in a configuration be 
downloaded only when the configuration is specified. Currently, 
dependencies are always downloaded unless they are optional, no 
matter where they're listed in the file. And optional 
dependencies are only downloaded when they are specified in 
dub.selections.json.

It would be a nice feature to have.



More information about the Digitalmars-d-learn mailing list