Am 21.10.2013 10:22, schrieb Joseph Rushton Wakeling:
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 followingpackage.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 ofsource/
.
I'll try to reproduce that later on a Linux machine.
I moved the library source back to
source/dgraph
and rewrote the dgraphpackage.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 onemain()
).
For the separate package.json approach, instead of the symlink
workaround, you can explicitly specify the path to the root package like
this:
{
...
"dependencies": {
"dgraph": {"version": "~master", "path": "../../"}
}
}
Hope this works out.