Open arpie42 opened 7 years ago
AFAICT subConfiguration does not even work inside a configuration clause, it is instead incorrectly always used, even if that configuration is not selected.
I think it's useful for propagating configurations to sub-packages? Since config is not saved when building sub packages...
It is not clear if this is by design or if it is a bug.
From delving into the dub source code, I am convinced that the only way to override a configuration of an arbitrary dependency is to use the --override-config flag on the command line.
However, the online documentation suggests that the subConfiguration[s] parameter of the dub.sdl/json file could be used to select a configuration of a dependency :
In reality, the only dependencies affected by the subConfiguration[s] setting are direct subPackages. And I don't actually see any valid use for it outside of configuration{} blocks of the parent project.
Have I understood this correctly?
I cannot decide if it makes sense to be able to override configurations of dependencies in the dub.sdl file. It would seem to make sense if the package is an application but not if it is a library. Does anybody else have any thoughts on this?
In any case, can we please either introduce this functionality and/or improve the documentation to better explain how to select configurations of dependencies, and how the subConfiguration[s] setting is intended to be used.
If somebody more familiar with dub could confirm that I have understood this correctly, I would be happy to have a go at putting together a PR.