Bug in -J
Mr. Pib via Digitalmars-d
digitalmars-d at puremagic.com
Fri Aug 11 19:34:49 PDT 2017
I have -J added to the command line like
-JC:\Temp
I then use import(r"C:\Temp\a.dat");
and I get an error about the file not existing in the
main.d: Error: file "C:\\Temp\\a.dat" cannot be found or not in a
path specified with -J
It seems dmd does internally compare the paths to see if they are
identical.
Of course, removing the C:\Temp\ part of import works fine.
The problem with that approach is it then is not consistent with
other code. I need to specify the full path because sometimes it
is used.
essentially
version(X)
import(path)
else
load(path);
while I could do something like
import(baseName(path))
it seems kinda clunky, in any case. It's pretty obvious that one
excepts the same behavior so it could create bugs in code that
except the behavior to work correctly.
More information about the Digitalmars-d
mailing list