dub subpckages and how to depend on them internally

Martin Tschierschke mt at smartdolphin.de
Thu May 31 12:55:10 UTC 2018


On Tuesday, 29 May 2018 at 23:41:59 UTC, aliak wrote:
> Hi, I'm trying to get dub working with subpackages and I just 
> can't quite seem to hit the nail on the head. Any help would be 
> greatly appreciated.
>
> This is the current setup is like this, and there's a shared 
> source folder as well called "common" and "sub2" depends on 
> "sub1".
>
> lib
>  |-- dub.json
>  |-- source/
>             | -- sub1/
>                      | -- package.d
>                      | -- dub.json
>             | -- sub2/
>                      | -- package.d
>                      | -- dub.json
>             | -- common/
>
[...]
> Halp!

I had a similar struggle, may be the version is the missing hint:

"dependencies": {
     "diet-ng": "~>1.4",
      ....,

      mylib":{
                 "versions": "~master",
                 "path": "/home/mt/d/mylib"
                 },
       ....
}

Try to place "versions": "~master", beside your path.






More information about the Digitalmars-d mailing list