www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dub test

reply Joel <joelcnz gmail.com> writes:
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"
     }
}
```
Feb 01
parent reply carblue <invalidaddress posteo.net> writes:
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
Feb 02
parent Joel <joelcnz gmail.com> writes:
On Friday, 2 February 2018 at 09:00:38 UTC, carblue wrote:
 On Friday, 2 February 2018 at 07:23:54 UTC, Joel wrote:
[snip]
 Import module base from file ... source/jmisc/base.d by: import 
 jmisc.base;
 and recommended read: 
 https://code.dlang.org/package-format?lang=json
Thanks carblue. I had to add 'source' as well to get it working.
Feb 02