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
Comment #3 by github-bugzilla — 2013-07-21T15:00:11Z
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 Merge pull request #2159 from AndrejMitrovic/Fix10327 Issue 10327 - More informative error message on missing package.d file