[Issue 12629] Adjust search path according to module name
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Apr 24 03:00:16 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12629
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrej.mitrovich at gmail.com
--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
Only thing to be careful about is the implementation. IOW in this case:
// unrelated file or module
a/c/foo.d:
// actual module we want
some/other/a/c/foo.d
module a.c.foo;
a/b/bar.d:
module a.b.bar;
import a.c.foo;
If you run:
$ cd a/b
$ dmd -Isome/other bar.d
The explicit import path should be favored over the implicit one. IOW, only if
the module hasn't been found in existing imports should the compiler try and
search in paths based on the module name.
--
More information about the Digitalmars-d-bugs
mailing list