dub icon indicating copy to clipboard operation
dub copied to clipboard

subpackages don't compile if root package has missing dependencies

Open WebFreak001 opened this issue 8 years ago • 0 comments

So I want to run a subpackage using dub run :subpackage to obtain a dependency that the root package has. However that is not possible because dub will complain about a missing dub.json file in that folder.

Instead I need to cd into the subpackage folder, run dub build and then cd back and run it in the subdirectory for it to work.

It would be nice if this kind of package structure would work. Also dub.json for reproducing:

dub.json (dep folder exists, but nothing in it yet)

{
    "name": "root-package",
    "dependencies": {
        "dep-package": { "path": "dep" }
    },
    "subPackages": ["./subpackage"]
}

subpackage/dub.json

{
    "name": "subpackage"
}

WebFreak001 avatar Jan 07 '17 16:01 WebFreak001