September 02, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6592

           Summary: di header file created even if errors occur
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: r.sagitario@gmx.de


--- Comment #0 from Rainer Schuetze <r.sagitario@gmx.de> 2011-09-02 00:59:07 PDT ---
Generating a di file from

---
module test;
import std.foo;
---

via "dmd -H -o- test.d" generates errors:
test.d(2): Error: module foo is in file 'std\foo.d' which cannot be read

but still creates the test.di file

---
// D import file generated from 'test.d'
module test;
import std.foo;
---

This can confuse the hell out of any make like build tool.

BTW: that is also the reason why building druntime works on windows if run twice, it reports an error only the first time (this uses posix.mak on windows, the win32.mak just misses un.di from the list of imports):

../dmd/src/dmd -m32 -c -d -o- -Isrc -Iimport -Hfimport/core/sys/posix/sys/un.di
src/core/sys/posix/sys/un.d
DMD v2.055 DEBUG
src\core\sys\posix\sys\un.d(17): Error: import sa_family_t not found
src\core\sys\posix\sys\un.d(17): Error: alias core.sys.posix.sys.un.sa_family_t
recursive alias declaration

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 09, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=6592


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich@gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-09 05:50:20 PST ---
The same is true for object files, although Walter said he wants them around to be able to inspect the output. Maybe this applies to .di files as well.

(personally I disagree with such a viewpoint, if something crashed or emitted an error the compiler source should be inspected, not its corrupted output).

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