www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - DUB Error

reply "Steve Teale" <steve.teale britseyeview.com> writes:
What does the somewhat cryptic DUB error

Trying to append absolute path.

mean.

By a process of elimination, the offending line in the json file 
is

"importPaths": ["/usr/local/include/d/gtkd-2"]

Steve
Feb 25 2014
parent reply "Jesse Phillips" <Jesse.K.Phillips+D gmail.com> writes:
On Tuesday, 25 February 2014 at 14:32:42 UTC, Steve Teale wrote:
 What does the somewhat cryptic DUB error

 Trying to append absolute path.

 mean.

 By a process of elimination, the offending line in the json 
 file is

 "importPaths": ["/usr/local/include/d/gtkd-2"]

 Steve
The path you have provide is an absolute path, I suspect that somewhere in the code it is doing something like: buildPath(curDir, importPath); However, buildPath doesn't have a check for appending absolute path, so probably a custom path library which is basically saying your ignoring the working directory.
Feb 25 2014
parent reply "Steve Teale" <steve.teale britseyeview.com> writes:
On Wednesday, 26 February 2014 at 03:33:38 UTC, Jesse Phillips 
wrote:
 On Tuesday, 25 February 2014 at 14:32:42 UTC, Steve Teale wrote:
 What does the somewhat cryptic DUB error

 Trying to append absolute path.

 mean.

 By a process of elimination, the offending line in the json 
 file is

 "importPaths": ["/usr/local/include/d/gtkd-2"]

 Steve
The path you have provide is an absolute path, I suspect that somewhere in the code it is doing something like: buildPath(curDir, importPath); However, buildPath doesn't have a check for appending absolute path, so probably a custom path library which is basically saying your ignoring the working directory.
I guess I was misunderstanding 'importPaths'. I got a little further along when I used "dflags": ["/usr/local/include/d/gtkd-2"] instead. But you'd think that since it is targeting D, importFlags might have that purpose. Steve
Feb 25 2014
parent =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig+dforum outerproduct.org> writes:
Am 26.02.2014 08:00, schrieb Steve Teale:
 On Wednesday, 26 February 2014 at 03:33:38 UTC, Jesse Phillips wrote:
 On Tuesday, 25 February 2014 at 14:32:42 UTC, Steve Teale wrote:
 What does the somewhat cryptic DUB error

 Trying to append absolute path.

 mean.

 By a process of elimination, the offending line in the json file is

 "importPaths": ["/usr/local/include/d/gtkd-2"]

 Steve
The path you have provide is an absolute path, I suspect that somewhere in the code it is doing something like: buildPath(curDir, importPath); However, buildPath doesn't have a check for appending absolute path, so probably a custom path library which is basically saying your ignoring the working directory.
I guess I was misunderstanding 'importPaths'. I got a little further along when I used "dflags": ["/usr/local/include/d/gtkd-2"] instead. But you'd think that since it is targeting D, importFlags might have that purpose. Steve
I'll check what goes wrong. Usually all places where paths are handled do "if (!path.absolute) path = package_path ~ path;" and thus *shouldn't* produce such errors. However, "dflags": ["-I/user/lo..."] (with -I) ought to work, too, even if it will produce a warning that recommends to use "importPaths" instead, to stay compatible with all D compilers. In this particular case I'd recommend to add "dependencies": {"gtk-d": "~master"} to use the DUB package for GTK instead (but please ignore me here if that's actually a completely different library).
Feb 26 2014