www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14050] New: `dmd -v` lists imports from failed


          Issue ID: 14050
           Summary: `dmd -v` lists imports from failed __traits(compiles)
           Product: D
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: public dicebot.lv

static if (__traits(compiles, { import missing; }))
    pragma(msg, "importing missing");
    import missing;
    pragma(msg, "not importing missing");

$ ./dmd/src/dmd -o- -v reduced.d 
binary    ./dmd/src/dmd
version   v2.067-devel-6b86b12
config    ./dmd/src/dmd.conf
parse     reduced
importall reduced
import    object    (/home/dicebot/devel/dlang/druntime/src/object.di)
semantic  reduced
import    missing   (missing.d)
not importing missing
semantic2 reduced
semantic3 reduced

Note the "import    missing   (missing.d)" line. It makes all build tools that
use `dmd -v` output to try to find and compile that module which is, of course,
not possible.

Marking issue as major because it blocks merging of std.experimental.logger

Jan 26 2015