www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16798] New: Extend -Ipath switch to -Imodule=path so path


          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 puremagic.com
          Reporter: bugzilla 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:

  import foo;   // looks up bar/abc.d

  import a.b.e;  // looks up c/e.d
  import x.a.b.e;  // looks up x/a/b/e.d

Nov 26 2016