Bug 7192 – improve error message for "object.d cannot be read"

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-12-31T17:13:00Z
Last change time
2015-06-09T05:10:38Z
Assigned to
andrej.mitrovich
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2011-12-31T17:13:30Z
Would be good to special-case this one, in module.c: ---- void Module::read(Loc loc) { //printf("Module::read('%s') file '%s'\n", toChars(), srcfile->toChars()); if (srcfile->read()) { error(loc, "is in file '%s' which cannot be read", srcfile->toChars()); ---- If srcfile == "object.d", it means there's a problem with the installation. Instead of the generic message, we could print something like, error(loc, "cannot find source code for runtime library file 'object.d'); errorSupplemental("dmd is not correctly installed. Paths in configuration file 'dmd.conf' may be incorrect."); This would help make D more newbie-friendly.
Comment #1 by andrej.mitrovich — 2012-10-28T11:48:39Z
*** Issue 3408 has been marked as a duplicate of this issue. ***
Comment #2 by github-bugzilla — 2012-11-21T16:27:50Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2ec9a289c183ec66b220d2b7650b48348907583f Fixes Issue 7192 - Print user-friendly error message on missing object.d druntime file https://github.com/D-Programming-Language/dmd/commit/aba5f2cd71c0dbd196794d00c7697f9f625dfaaa Merge pull request #1218 from AndrejMitrovic/Fix7192 [trivial] Fix Issue 7192 - Print user-friendly error message on missing object.d file