Bug 10327 – Missing 'package.d' for DIP37 needs a better error message
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-10T15:40:00Z
Last change time
2013-07-21T15:00:19Z
Keywords
diagnostic, pull
Assigned to
andrej.mitrovich
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2013-06-10T15:40:37Z
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'
Comment #1 by andrej.mitrovich — 2013-06-10T15:42:03Z
(In reply to comment #0)
> 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".
Comment #2 by andrej.mitrovich — 2013-06-10T16:27:26Z