www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22742] New: Improve error message for missing module in


          Issue ID: 22742
           Summary: Improve error message for missing module in
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: tim.dlang t-online.de

Druntime master contains the new template imported, which allows to use symbols
from a module without a normal import. The error message for a missing module
currently only contains the location of the template in object.d, but the
location, where imported is used, would also be useful. The following code
demonstrates the problem:

imported!q{std.missing}.Type var;

DMD nightly currently generates the following output:

Error: unable to read module `missing`
       Expected 'std/missing.d' or 'std/missing/package.d' in one of the
following import paths:
import path[0] =
import path[1] =

Feb 06 2022