[Issue 16798] New: Extend -Ipath switch to -Imodule=path so path heirarchy doesn't have to match package heirarchy
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Nov 26 18:29:24 PST 2016
https://issues.dlang.org/show_bug.cgi?id=16798
Issue ID: 16798
Summary: Extend -Ipath switch to -Imodule=path so path
heirarchy doesn't have to match package heirarchy
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
The trouble comes from when code tends to wind up in multiple locations, and
refactoring the package/module names is undesirable for various reasons. It
winds up forcing all modules to be specified on the command line, meaning they
are all subject to the same compiler switches, and may be too big to compile
all at once.
This enhancement enables each package/module to have an individual path/file
associated with it. The package/module will be matched from the left. The
-Ipath still applies to the result.
For example:
-Ifoo=bar/abc
import foo; // looks up bar/abc.d
-Ia.b=c
import a.b.e; // looks up c/e.d
import x.a.b.e; // looks up x/a/b/e.d
--
More information about the Digitalmars-d-bugs
mailing list