build a subpackage in dub?
cy via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jul 16 10:26:05 PDT 2016
Say I have a package called "main" and a sub-package in a
"complicatedexample" directory, and my dub.json in "main" looks
sort of like:
"subPackages": [
"./complicatedexample/"
],
Let's say I do *not* have ":complicatedexample" in my
dependencies for "main", but "complicatedexample" itself imports
from /other/ sub-packages in main, like I dunno, "support"
"coolstuff" "thingies" or whatever.
I can't chdir to complicatedexample and dub -v build, because it
says "Unknown dependency: complicatedexample:support" since it
can't know that it's in a subpackage. But I also can't build
":complicatedexample" from in the main directory, because "dub
build -v :complicatedexample" gives me "Failed to find a package
named main:complicatedexample".
I swear I figured out how to do this before, but I honestly
cannot remember. The example imports a huge C library and
compiles stubs and does all sorts of stupid stuff that the rest
of the program doesn't have anything to do with at all, just to
demonstrate the algorithm. But I don't know how to isolate it.
Any ideas?
Just... create a totally separate package, and remember to copy
and paste all the other sub-packages to it, and add all the other
subpackages to every dub.json manually?
More information about the Digitalmars-d-learn
mailing list