dub test

carblue invalidaddress at posteo.net
Fri Feb 2 09:00:38 UTC 2018


On Friday, 2 February 2018 at 07:23:54 UTC, Joel wrote:
> When I try 'dub test' I get errors like 'Source file 
> '/Users/joelchristensen/jpro/dpro2/JMiscLib/source/jmisc/base.d' not found in any import path.'
>
> Here's the dub.json file I'm using:
>
> ```
> {
> 	"name": "timelog",
>     "targetType": "executable",
> 	"description": "A Joel D program. A D Diary program.",
> 	"copyright": "Copyright © 2018, joelcnz - note: I don't 
> understand this",
> 	"authors": ["Joel Ezra Christensen"],
>     "DFLAGS": ["g"],
>     "sourcePaths" : ["source",
>                      "../JTaskLib/source",
>                      "../JMiscLib/source"
>                     ],
>     "dependencies": {
>         "dlangui": "~>0.9.56"
>     }
> }
> ```

Add before e.g. "dependencies"
      "importPaths" : ["../JTaskLib/source",
                       "../JMiscLib/source"
                      ],

Import module base from file ... source/jmisc/base.d by: import 
jmisc.base;
and recommended read: 
https://code.dlang.org/package-format?lang=json



More information about the Digitalmars-d-learn mailing list