Local libraries/packages with dub: How?

z z at z.com
Tue Dec 1 06:39:26 UTC 2020


On Tuesday, 1 December 2020 at 04:50:03 UTC, rikki cattermole 
wrote:
> ...

What puzzles me is that the dependencies are indeed declared, but 
"dub describe" refuses to recognize the dependencies and "dub 
build" fails.
"dub list" does recognize the root folder, but trying to get a 
subpackage to import another fails because the dependency isn't 
imported.(dmd only sees the "source" and phobos/runtime import 
paths)

The root dub.sdl roughly contains this :
>name "fldr"
>dependencies "fldr:spkg1" "fldr:spkg2" "fldr:spkg3" // tried 
>with and without "fldr:"
>subPackage "./spkg1/"
>subPackage "./spkg2/"
>subPackage "./spkg3/"
>targetType "none"
While for example, "spkg3"'s dub.sdl contains this :
>>name "spkg3"
>>dependencies "fldr:spkg2"
  And its source/*.d file contains this :
>>>import std.stdio, fldr.spkg2; //tried with and without "fldr."
>>>void main() {writeln(«function from spkg2»)}


More information about the Digitalmars-d-learn mailing list