dub subpckages and how to depend on them internally

aliak something at something.com
Sun Jun 3 12:08:44 UTC 2018


On Thursday, 31 May 2018 at 20:01:43 UTC, Jesse Phillips wrote:
> On Thursday, 31 May 2018 at 17:56:57 UTC, aliak wrote:
>> root
>>  |-- sub1/source
>>  |-- sub2/source
>
> Do that.
>
> You can have a top level source folder, but this is going to be 
> code separate from your subpackage. The subpackage can depend 
> on this top-level project, or the top-level project can depend 
> on the subpackage.

Ok I tried this as well, but I still get a

module `sub1` is in file 'lib/sub1.d' which cannot be read

I put up a GH test project with exactly what I'm doing. 
https://github.com/aliak00/dub-subpackages. There's a "lib" 
project that has subpackages "liba" and "libb" and there's a test 
application that tries to use the subpackages in different ways.

The exact error for that setup is:

source/app.d(4,9): Error: module `liba` is in file 'lib/liba.d' 
which cannot be read
import path[0] = source/
import path[1] = ../lib/liba/source/
import path[2] = ../lib/libb/source/
import path[3] = /usr/local/opt/dmd/include/dlang/dmd


Am I missing sourcePaths or something somewhere?



More information about the Digitalmars-d mailing list