On Mon, 21 Oct 2013 08:05:51 GMT, Joseph Rushton Wakeling wrote:

I symlinked the package dir into .dub/packages and dub list-installed recognizes its presence. I then created a separate project containing just source/app.d and the following package.json:

{
    "name": "dgraph-test",
    "version": "~master",
    "targetType": "executable",
    "dependencies": { "dgraph": "~master" }
}

Issuing dub build in that project results in the following error

... which persists even with the latest updates to dub. I think it's simply because the library source is in import/ instead of source/.

I moved the library source back to source/dgraph and rewrote the dgraph package.json to be:

{
    "name": "dgraph",
    "version": "~master",
    "description": "A library for creating, analysing and manipulating graphs (networks).  It aims to be fast and memory-efficient while also being easy to use and extend.",
    "authors": ["Joseph Rushton Wakeling"],
    "copyright": "Copyright © 2013 Joseph Rushton Wakeling",
    "homepage": "https://github.com/WebDrake/Dgraph",
    "license": "GPL-3.0 or later",
    "targetType": "sourceLibrary",
    "excludedSourceFiles": ["source/graphtest.d", "source/betweenness50.d", "source/betweenness10k.d"]
}

... and now my downstream separate dgtest project builds successfully. Good progress! So I'll see if I can now get things working using separate directory structures as you suggest -- much preferable to the "excludedSourceFiles" approach I've had to take here (which is necessary, otherwise the downstream project starts complaining about more than one main()).