RejectedSoftware Forums

Sign up

Pages: 1 2

spurious unknown dependency error

from a project with zmqd as a dependency, with an empty ~/.dub

1st run:

$ dub build
The following changes will be performed:
Fetch zeromq ~master, userWide
Fetch zmqd ~master, userWide
Fetching zeromq ~master...
Placing zeromq ~master to /home/space/phujfj/.dub/packages/...
Fetching zmqd ~master...
Placing zmqd ~master to /home/space/phujfj/.dub/packages/...
Error executing command build: Unknown dependency: zeromq

then 2nd attempt:

$ dub build
The following changes will be performed:
Fetch zeromq ~master, userWide
Fetching zeromq ~master...
Placing zeromq ~master to /home/space/phujfj/.dub/packages/...
Error executing command build: zeromq (~master) needs to be removed from '/home/space/phujfj/.dub/packages/zeromq-master' prior placement.

What gives?

Re: spurious unknown dependency error

With --vverbose:

1st time:

$ dub --vverbose build
Using dub registry url 'http://code.dlang.org/'
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/space/phujfj/.dub/packages/local-packages.json
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/space/phujfj/.dub/packages/local-packages.json
Failed to run git: git rev-parse failed: fatal: Not a git repository: '/home/space/phujfj/Documents/DistD/.git'

Note: Failed to determine version of package distd at /home/space/phujfj/Documents/DistD. Assuming ~master.
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/space/phujfj/.dub/packages/local-packages.json
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/space/phujfj/.dub/packages/local-packages.json
Collecting dependencies for distd
Found dependency zmqd ~master: false
Checking dependencies in '/home/space/phujfj/Documents/DistD'
Try to resolve ["zmqd"]
There are 1 packages missing.
Adding package to graph: zmqd
Fetching package zmqd (1 suppliers registered)
Downloading metadata for zmqd
Getting from http://code.dlang.org/packages/zmqd.json
Getting http://code.dlang.org/packages/zmqd.json...
markUpToDate(zmqd)
writeDubJson
Try to resolve ["zeromq"]
There are 1 packages missing.
Adding package to graph: zeromq
Fetching package zeromq (1 suppliers registered)
Downloading metadata for zeromq
Getting from http://code.dlang.org/packages/zeromq.json
Getting http://code.dlang.org/packages/zeromq.json...
markUpToDate(zeromq)
writeDubJson
Triggering retrieval of required package 'zeromq', which was not present.
Triggering retrieval of required package 'zmqd', which was not present.
writeDubJson
The following changes will be performed:
Fetch zeromq ~master, userWide
Fetch zmqd ~master, userWide
Fetching zeromq ~master...
Acquiring package zip file
Found download URL: 'http://code.dlang.org/packages/zeromq/~master.zip'
Storing http://code.dlang.org/packages/zeromq/~master.zip...
Placing zeromq ~master to /home/space/phujfj/.dub/packages/...
Placing package 'zeromq' version '~master' to location '/home/space/phujfj/.dub/packages/zeromq-master' from file '/tmp/zeromq-master.zip'
Opening file /tmp/zeromq-master.zip
Extracting from zip.
zip root folder: ZeroMQ-master
Copying all files...
Creating AUTHORS
Creating C/
Creating C/zmq.h
Creating deimos/zmq/utils.d
Creating examples/README
Creating package.json
Creating deimos/zmq/zmq.d
Creating C/zmq_utils.h
Creating README
Creating deimos/
Creating examples/
Creating examples/hwclient.d
Creating examples/hwserver.d
Creating deimos/zmq/
10 file(s) copied.
Failed to run git: git rev-parse failed: fatal: Not a git repository: '/home/space/phujfj/.dub/packages/zeromq-master/.git'

Note: Failed to determine version of package ZeroMQ at /home/space/phujfj/.dub/packages/zeromq-master. Assuming ~master.
Saving retrieval action journal...
Fetching zmqd ~master...
Acquiring package zip file
Found download URL: 'http://code.dlang.org/packages/zmqd/~master.zip'
Storing http://code.dlang.org/packages/zmqd/~master.zip...
Placing zmqd ~master to /home/space/phujfj/.dub/packages/...
Placing package 'zmqd' version '~master' to location '/home/space/phujfj/.dub/packages/zmqd-master' from file '/tmp/zmqd-master.zip'
Opening file /tmp/zmqd-master.zip
Extracting from zip.
zip root folder: zmqd-master
Copying all files...
Creating LICENCE.txt
Creating examples/taskvent.d
Creating examples/msreader.d
Creating src/zmqd.d
Creating examples/README.txt
Creating examples/wuclient.d
Creating examples/
Creating examples/tasksink.d
Creating examples/hwclient.d
Creating README.md
Creating examples/wuserver.d
Creating package.json
Creating examples/zhelpers.d
Creating examples/taskwork.d
Creating examples/hwserver.d
Creating src/
14 file(s) copied.
Failed to run git: git rev-parse failed: fatal: Not a git repository: '/home/space/phujfj/.dub/packages/zmqd-master/.git'

Note: Failed to determine version of package zmqd at /home/space/phujfj/.dub/packages/zmqd-master. Assuming ~master.
Saving retrieval action journal...
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/space/phujfj/.dub/packages/local-packages.json
iterating dir /home/space/phujfj/.dub/packages/
iterating dir /home/space/phujfj/.dub/packages/ entry zeromq-master
iterating dir /home/space/phujfj/.dub/packages/ entry zmqd-master
Collecting dependencies for distd
Found dependency zmqd ~master: true
Collecting dependencies for zmqd
Found dependency zeromq ~master: false
Try to resolve ["zmqd"]
There are 1 packages missing.
Adding package to graph: zmqd
Found present package zmqd ~master
Try to resolve ["zeromq"]
There are 1 packages missing.
Adding package to graph: zeromq
Fetching package zeromq (1 suppliers registered)
markUpToDate(zeromq)
writeDubJson
Triggering retrieval of required package 'zeromq', which was not present.
Required package 'zmqd' found with version '~master'
writeDubJson
Error executing command build: Unknown dependency: zeromq

Full exception: object.Exception@source/dub/project.d(141): Unknown dependency: zeromq
----------------
dub(const(int delegate(int delegate(ref const(dub.package_.Package))) function(bool, const(dub.package_.Package), immutable(char)[][immutable(char)[]])) dub.project.Project.getTopologicalPackageList.int iterator(int delegate(ref const(dub.package_.Package))).void perform_rec(const(dub.package_.Package)).int __foreachbody3(ref immutable(char)[], ref const(dub.dependency.Dependency))+0xb1) [0x61d025]
dub(_aaApply2+0x6a) [0x6dc53a]
dub(const(int delegate(int delegate(ref const(dub.package_.Package))) function(bool, const(dub.package_.Package), immutable(char)[][immutable(char)[]])) dub.project.Project.getTopologicalPackageList.int iterator(int delegate(ref const(dub.package_.Package))).void perform_rec(const(dub.package_.Package))+0x13d) [0x61cf11]
dub(const(int delegate(int delegate(ref const(dub.package_.Package))) function(bool, const(dub.package_.Package), immutable(char)[][immutable(char)[]])) dub.project.Project.getTopologicalPackageList.int iterator(int delegate(ref const(dub.package_.Package))).void perform_rec(const(dub.package_.Package)).int __foreachbody3(ref immutable(char)[], ref const(dub.dependency.Dependency))+0xca) [0x61d03e]
dub(_aaApply2+0x6a) [0x6dc53a]
dub(const(int delegate(int delegate(ref const(dub.package_.Package))) function(bool, const(dub.package_.Package), immutable(char)[][immutable(char)[]])) dub.project.Project.getTopologicalPackageList.int iterator(int delegate(ref const(dub.package_.Package))).void perform_rec(const(dub.package_.Package))+0x13d) [0x61cf11]
dub(const(int delegate(int delegate(ref const(dub.package_.Package))) function(bool, const(dub.package_.Package), immutable(char)[][immutable(char)[]])) dub.project.Project.getTopologicalPackageList.int iterator(int delegate(ref const(dub.package_.Package)))+0x64) [0x61cdc8]
dub(const(immutable(char)[][immutable(char)[]] function(const(dub.compilers.compiler.BuildPlatform), immutable(char)[], bool)) dub.project.Project.getPackageConfigs+0x1c2) [0x61de7e]
dub(const(immutable(char)[] function(dub.compilers.compiler.BuildPlatform, bool)) dub.project.Project.getDefaultConfiguration+0x7f) [0x61d26b]
dub(int dub.commandline.GenerateCommand.execute(dub.dub.Dub, immutable(char)[][], immutable(char)[][])+0x37a) [0x5f07c6]
dub(int dub.commandline.BuildCommand.execute(dub.dub.Dub, immutable(char)[][], immutable(char)[][])+0x8d) [0x5f0dd9]
dub(int dub.commandline.runDubCommandLine(immutable(char)[][])+0x11e8) [0x5eeb7c]
dub(_Dmain+0x20) [0x5ed34c]
dub(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll().void __lambda1()+0x18) [0x6dd734]
dub(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x6dd68e]
dub(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()+0x30) [0x6dd6f4]
dub(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x6dd68e]
dub(_d_run_main+0x1a3) [0x6dd60f]
dub(main+0x25) [0x5ed991]
/lib64/libc.so.6(__libc_start_main+0xe6) [0x7f2a0c918c36]

2nd time:

$ dub --vverbose build
Using dub registry url 'http://code.dlang.org/'
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/space/phujfj/.dub/packages/local-packages.json
iterating dir /home/space/phujfj/.dub/packages/
iterating dir /home/space/phujfj/.dub/packages/ entry zeromq-master
iterating dir /home/space/phujfj/.dub/packages/ entry zmqd-master
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/space/phujfj/.dub/packages/local-packages.json
iterating dir /home/space/phujfj/.dub/packages/
iterating dir /home/space/phujfj/.dub/packages/ entry zeromq-master
iterating dir /home/space/phujfj/.dub/packages/ entry zmqd-master
Failed to run git: git rev-parse failed: fatal: Not a git repository: '/home/space/phujfj/Documents/DistD/.git'

Note: Failed to determine version of package distd at /home/space/phujfj/Documents/DistD. Assuming ~master.
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/space/phujfj/.dub/packages/local-packages.json
iterating dir /home/space/phujfj/.dub/packages/
iterating dir /home/space/phujfj/.dub/packages/ entry zeromq-master
iterating dir /home/space/phujfj/.dub/packages/ entry zmqd-master
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/space/phujfj/.dub/packages/local-packages.json
iterating dir /home/space/phujfj/.dub/packages/
iterating dir /home/space/phujfj/.dub/packages/ entry zeromq-master
iterating dir /home/space/phujfj/.dub/packages/ entry zmqd-master
Collecting dependencies for distd
Found dependency zmqd ~master: true
Collecting dependencies for zmqd
Found dependency zeromq ~master: false
Checking dependencies in '/home/space/phujfj/Documents/DistD'
Try to resolve ["zmqd"]
There are 1 packages missing.
Adding package to graph: zmqd
Found present package zmqd ~master
Try to resolve ["zeromq"]
There are 1 packages missing.
Adding package to graph: zeromq
Fetching package zeromq (1 suppliers registered)
Downloading metadata for zeromq
Getting from http://code.dlang.org/packages/zeromq.json
Getting http://code.dlang.org/packages/zeromq.json...
markUpToDate(zeromq)
writeDubJson
Triggering retrieval of required package 'zeromq', which was not present.
Required package 'zmqd' found with version '~master'
writeDubJson
The following changes will be performed:
Fetch zeromq ~master, userWide
Fetching zeromq ~master...
Acquiring package zip file
Found download URL: 'http://code.dlang.org/packages/zeromq/~master.zip'
Storing http://code.dlang.org/packages/zeromq/~master.zip...
Placing zeromq ~master to /home/space/phujfj/.dub/packages/...
Placing package 'zeromq' version '~master' to location '/home/space/phujfj/.dub/packages/zeromq-master' from file '/tmp/zeromq-master.zip'
Error executing command build: zeromq (~master) needs to be removed from '/home/space/phujfj/.dub/packages/zeromq-master' prior placement.

Full exception: object.Exception@source/dub/packagemanager.d(212): zeromq (~master) needs to be removed from '/home/space/phujfj/.dub/packages/zeromq-master' prior placement.
----------------
dub(dub.package_.Package dub.dub.Dub.fetch(immutable(char)[], const(dub.dependency.Dependency), dub.project.PlacementLocation, bool, bool)+0x7af) [0x5fe56b]
dub(void dub.dub.Dub.update(dub.project.UpdateOptions)+0x4b6) [0x5fc952]
dub(void dub.commandline.PackageBuildCommand.setupPackage(dub.dub.Dub, immutable(char)[])+0x2f6) [0x5efb8a]
dub(int dub.commandline.GenerateCommand.execute(dub.dub.Dub, immutable(char)[][], immutable(char)[][])+0x1d7) [0x5f0623]
dub(int dub.commandline.BuildCommand.execute(dub.dub.Dub, immutable(char)[][], immutable(char)[][])+0x8d) [0x5f0dd9]
dub(int dub.commandline.runDubCommandLine(immutable(char)[][])+0x11e8) [0x5eeb7c]
dub(_Dmain+0x20) [0x5ed34c]
dub(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll().void __lambda1()+0x18) [0x6dd734]
dub(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x6dd68e]
dub(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()+0x30) [0x6dd6f4]
dub(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x6dd68e]
dub(_d_run_main+0x1a3) [0x6dd60f]
dub(main+0x25) [0x5ed991]
/lib64/libc.so.6(__libc_start_main+0xe6) [0x7f179d9d7c36]

Re: spurious unknown dependency error

Which version of DUB are you using? There was a similar issue fixed
recently (should be in 0.9.21-beta.3).

Re: spurious unknown dependency error

On Wed, 05 Feb 2014 17:00:09 +0100, Sönke Ludwig wrote:

Which version of DUB are you using? There was a similar issue fixed
recently (should be in 0.9.21-beta.3).

git master

Re: spurious unknown dependency error

Found the problem:

The package name for deimos zeromq wasn't lower-case: https://github.com/D-Programming-Deimos/ZeroMQ/pull/10

Re: spurious unknown dependency error

Am 06.02.2014 14:40, schrieb John Colvin:

Found the problem:

The package name for deimos zeromq wasn't lower-case: https://github.com/D-Programming-Deimos/ZeroMQ/pull/10

Thanks for investigating this! I'll fix DUB to be able to handle this
anyway. The idea is that it should output a warning from the command
line when upper case letters are used and that the registry rejects such
names, but that everything still works correctly.

Re: spurious unknown dependency error

On Thu, 06 Feb 2014 14:56:48 +0100, Sönke Ludwig wrote:

Am 06.02.2014 14:40, schrieb John Colvin:

Found the problem:

The package name for deimos zeromq wasn't lower-case: https://github.com/D-Programming-Deimos/ZeroMQ/pull/10

Thanks for investigating this! I'll fix DUB to be able to handle this
anyway. The idea is that it should output a warning from the command
line when upper case letters are used and that the registry rejects such
names, but that everything still works correctly.

Okay, the direct cause is fixed now by fbf3998, but there is another error in the zeromq package description - an "importPath": ["."] field needs to be added or the compilation will fail without --combined. Maybe the easiest thing is to add that to the existing pull request.

Re: spurious unknown dependency error

On Thu, 06 Feb 2014 15:53:34 GMT, Sönke Ludwig wrote:

On Thu, 06 Feb 2014 14:56:48 +0100, Sönke Ludwig wrote:

Am 06.02.2014 14:40, schrieb John Colvin:

Found the problem:

The package name for deimos zeromq wasn't lower-case: https://github.com/D-Programming-Deimos/ZeroMQ/pull/10

Thanks for investigating this! I'll fix DUB to be able to handle this
anyway. The idea is that it should output a warning from the command
line when upper case letters are used and that the registry rejects such
names, but that everything still works correctly.

Okay, the direct cause is fixed now by fbf3998, but there is another error in the zeromq package description - an "importPath": ["."] field needs to be added or the compilation will fail without --combined. Maybe the easiest thing is to add that to the existing pull request.

Is this right:
https://github.com/D-Programming-Deimos/ZeroMQ/pull/11

I'm not sure I fully understand the difference between sourcePaths and importPaths

Re: spurious unknown dependency error

On Thu, 06 Feb 2014 16:26:38 GMT, John Colvin wrote:

On Thu, 06 Feb 2014 15:53:34 GMT, Sönke Ludwig wrote:

(...)

Okay, the direct cause is fixed now by fbf3998, but there is another error in the zeromq package description - an "importPath": ["."] field needs to be added or the compilation will fail without --combined. Maybe the easiest thing is to add that to the existing pull request.

Is this right:
https://github.com/D-Programming-Deimos/ZeroMQ/pull/11

I'm not sure I fully understand the difference between sourcePaths and importPaths

Looks good. "sourcePaths" are searched recursively for D files that are passed to the compiler and "importPaths" are paths that will be specified as -Ipath to the compiler. Most of the time they will be the same, but for the particular structure used here, they differ (if "importPaths": ["deimos"] were set, one would have to write import zmq.zmq; instead of import deimos.zmq.zmq;).

Re: spurious unknown dependency error

On Thu, 06 Feb 2014 16:36:18 GMT, Sönke Ludwig wrote:

On Thu, 06 Feb 2014 16:26:38 GMT, John Colvin wrote:

On Thu, 06 Feb 2014 15:53:34 GMT, Sönke Ludwig wrote:

(...)

Okay, the direct cause is fixed now by fbf3998, but there is another error in the zeromq package description - an "importPath": ["."] field needs to be added or the compilation will fail without --combined. Maybe the easiest thing is to add that to the existing pull request.

Is this right:
https://github.com/D-Programming-Deimos/ZeroMQ/pull/11

I'm not sure I fully understand the difference between sourcePaths and importPaths

Looks good. "sourcePaths" are searched recursively for D files that are passed to the compiler and "importPaths" are paths that will be specified as -Ipath to the compiler. Most of the time they will be the same, but for the particular structure used here, they differ (if "importPaths": ["deimos"] were set, one would have to write import zmq.zmq; instead of import deimos.zmq.zmq;).

so sourcePaths is used for building the package itself, but importPaths is used when building depedent packages, as their import paths?
Hence --combined would mean that when compiling the dependent package, all of the depended-on packages sourcePath files are dumped to dmd, rendering importPaths irrelevant as dmd has everything it needs.

Pages: 1 2