dub
dub copied to clipboard
platform specific dependencies
i would like to do this:
"dependencies": {
"base": {"version":"~master", "path":"../base"},
"framework": {"version":"~master", "path":"../framework"}
},
"dependencies-osx": {
"derelict-cf": "~>0.0.1"
}
but right now even on windows the derelict-cf package is fetched and built...
Currently this requires the use of configurations:
"configurations": [
{
"name": "cf",
"platforms": ["osx"],
"dependencies": {
"derelict-cf": "~>0.0.1"
}
},
{
"name": "win32",
"platforms": "windows"
}
]
It should be possible to extend "dependencies" to accept platform specifications in theory, but at least there should be a warning now that the suffix gets ignored...
SDL format supports platform specific dependencies, but currently there is still no way to express this in JSON format.
This also leads to problems when trying to convert SDL to JSON with the convert tool when platform specific dependencies are preset:
dependency "mir-linux-kernel" version="~>1.0.0" platform="linux"
... gets translated to:
"dependencies": {
"mir-linux-kernel": "~>1.0.0"
}
... which is clearly wrong for non-linux platforms.
I propose this should be supported in both formats, not just in SDL.
First steps to add support for this started in https://github.com/dlang/dub/pull/1794.
SDL format supports platform specific dependencies, but currently there is still no way to express this in JSON format.
This also leads to problems when trying to convert SDL to JSON with the convert tool when platform specific dependencies are preset:
dependency "mir-linux-kernel" version="~>1.0.0" platform="linux"... gets translated to:
"dependencies": { "mir-linux-kernel": "~>1.0.0" }... which is clearly wrong for non-linux platforms.
I propose this should be supported in both formats, not just in SDL.
this does not apply per docs