www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10327] New: Missing 'package.d' for DIP37 needs a better error message

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10327

           Summary: Missing 'package.d' for DIP37 needs a better error
                    message
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com



15:40:37 PDT ---
If you have the directory "foo\bar" and try to compile this test.d file:

-----
module test;

import foo.bar;

void main() { }
-----

The error is: test.d(3): Error: module bar is in file 'foo\bar\package.d' which
cannot be read

When there is no such directory the error is simple:

The error is: test.d(3): Error: module bar is in file 'foo\bar.d' which cannot
be read

This is ok.

But the package error message is confusing to anyone not aware of the feature
in DIP37. To make it informative, it should print:

test.d(3): Error: importing package foo.bar requires package.d which is not
found in 'foo\bar\package.d'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 10 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10327




15:42:03 PDT ---

 test.d(3): Error: importing package foo.bar requires package.d which is not
 found in 'foo\bar\package.d'
Or "which cannot be found" or "which cannot be read". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 10 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10327


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
         AssignedTo|nobody puremagic.com        |andrej.mitrovich gmail.com



16:27:26 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2159

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 10 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10327




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0d30f12f2b9f0b4fe71938b02065a752ebe6fb63
Fixes Issue 10327 - More informative error message on missing package.d file.

https://github.com/D-Programming-Language/dmd/commit/477e42a03576d758c8902afb495525d84c0a1d1e


Issue 10327 - More informative error message on missing package.d file

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 21 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10327


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 21 2013