www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10177] New: irrelevant compiler error messages: should stop semantic3 passes after 1st error is encountered

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

           Summary: irrelevant compiler error messages: should stop
                    semantic3 passes after 1st error is encountered
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: thelastmammoth gmail.com



In a number of cases I get large compile error messages after running rdmd
main.d

Upon inspection, running with -v reveals that the irrelevant error messages are
in subsequent semantic3 passes:

semantic3 module_with_relevant_error
relevant error (eg: Error: no property 'x' for type 'y')
semantic3 module_with_irrelevant_error 
irrelevant error (only coming from the fact that there was an error in a prior
semantic pass)
...
and the list goes on for large number of lines.

Why not just stop semantic3 passes at 1st error occurence ?
or at least only show those by default?

in all cases i've encountered all that was needed for me to see was the 1st
faulty semantic3 pass, all other was irrelevant artifacts stemming from that.

I tried to reduce my case through dustmite with no success. Hopefully this is
clear enough.

(posted on
http://forum.dlang.org/post/mailman.1443.1369088668.4724.digitalmars-d-learn puremagic.com
but got no answer)

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




ok i managed to reduce with a bit of manual and a bit of dustmite:

-------------
main.d:
import functional;
import test;

functional.d:
void fun3(){
    import std.array:split;
    enum a=split(``," ");
}

test.d:
import std.stdio;
void fun(){
   1==b; //that's where the real error is
}

--------------
rdmd --force -unittest main.d
it spills out lots of irrelevant stuff:
test.d(4): Error: undefined identifier b
src/phobos/std/algorithm.d(2376): Error: template std.algorithm.find does not
match any function template declaration. Candidates are:
...
...
functional.d(3):        instantiated from here: split!(string, string)
functional.d(3): Error: template instance std.array.split!(string, string)
error instantiating
functional.d(3): Error: CTFE failed because of previous errors in split



running with -v i get:
semantic3 test
test.d(4): Error: undefined identifier b
semantic3 functional
[irrelevant errors follow]

So once again, I see the same cause and probably same solution: stop semantic3
passes at 1st error occurence.

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




I cannot reproduce this. I just get:

 rdmd -v --force -unittest main
DMD v2.063-devel-1bc8306 DEBUG test.d(3): Error: undefined identifier b Are you using an official DMD? I normally see this kind of behaviour when I've built DMD from git, and haven't run 'make clean' first. (Note that DMD's makefile is completely broken, it has many dependencies missing. If you just type 'make', you'll get a corrupt executable). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 31 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10177


Martin Krejcirik <mk krej.cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mk krej.cz




 I cannot reproduce this. I just get:
I get exactly same message as in #comment 1 (dmd HEAD, rebuild from clean) running dmd -unittest main.d test.d functional.d. Without -unittest I get just one line message. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 01 2013