Bug 16798 – Extend -Ipath switch to -Imodule=path so path heirarchy doesn't have to match package heirarchy
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-11-27T02:29:00Z
Last change time
2017-01-16T23:25:34Z
Assigned to
nobody
Creator
bugzilla
Comments
Comment #0 by bugzilla — 2016-11-27T02:29:24Z
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