digitalmars.D.learn - Limit number of compiler error messages
- cal (2/2) May 19 2012 Is there a way to limit the dmd compiler to outputting just the
- Don Clugston (6/8) May 22 2012 No, but the intention of DMD is to generate only one error per bug in
- Robert Clipsham (12/14) May 22 2012 As Don said, if there are any useless error messages it is a bug, and
- cal (8/18) May 22 2012 They are probably all valid errors, I am porting a rather large C
- Dmitry Olshansky (5/26) May 22 2012 Check both stdout & stderr. There is something funny with the way they
- cal (3/5) May 22 2012 Ahh... on my home laptop, it must go to stderr, on my work
- Stewart Gordon (11/20) May 27 2012 By "something similar" do you mean a way of piping stderr, or a head uti...
- cal (4/11) May 27 2012 Win7. Yeah, using 2> works like you say to redirect, I hadn't
- Andrej Mitrovic (4/6) May 22 2012 If you're getting a ton of unrelated errors it might be related to
Is there a way to limit the dmd compiler to outputting just the first few errors it comes across?
May 19 2012
On 20/05/12 00:38, cal wrote:Is there a way to limit the dmd compiler to outputting just the first few errors it comes across?No, but the intention of DMD is to generate only one error per bug in your code. If you are seeing a large number of useless errors, please report it in bugzilla. http://d.puremagic.com/issues/show_bug.cgi?id=8082 is a good example.
May 22 2012
On 19/05/2012 23:38, cal wrote:Is there a way to limit the dmd compiler to outputting just the first few errors it comes across?As Don said, if there are any useless error messages it is a bug, and needs to be reported at: http://d.puremagic.com/issues/ This said, if you're on a non-Windows platform, you can use the following: <my build command> 2>&1 | head -n <number of lines you want to see> Where <my build command> is your dmd/rdmd/build script command. There's probably something similar you could use on Windows, I don't really know though. -- Robert http://octarineparrot.com/
May 22 2012
On Tuesday, 22 May 2012 at 09:50:41 UTC, Robert Clipsham wrote:As Don said, if there are any useless error messages it is a bug, and needs to be reported at: http://d.puremagic.com/issues/ This said, if you're on a non-Windows platform, you can use the following: <my build command> 2>&1 | head -n <number of lines you want to see> Where <my build command> is your dmd/rdmd/build script command. There's probably something similar you could use on Windows, I don't really know though.They are probably all valid errors, I am porting a rather large C file to D and it takes a few seconds (perhaps 10 seconds) for the compiler to finish listing all the things I haven't fixed up yet, makes the process a bit more tedious is all. No biggy, thought there might be a switch I missed. Interestingly, I don't seem able to redirect the compiler output on Windows, or even pipe it.
May 22 2012
On 22.05.2012 21:36, cal wrote:On Tuesday, 22 May 2012 at 09:50:41 UTC, Robert Clipsham wrote:Check both stdout & stderr. There is something funny with the way they are setup on Windows. -- Dmitry OlshanskyAs Don said, if there are any useless error messages it is a bug, and needs to be reported at: http://d.puremagic.com/issues/ This said, if you're on a non-Windows platform, you can use the following: <my build command> 2>&1 | head -n <number of lines you want to see> Where <my build command> is your dmd/rdmd/build script command. There's probably something similar you could use on Windows, I don't really know though.They are probably all valid errors, I am porting a rather large C file to D and it takes a few seconds (perhaps 10 seconds) for the compiler to finish listing all the things I haven't fixed up yet, makes the process a bit more tedious is all. No biggy, thought there might be a switch I missed. Interestingly, I don't seem able to redirect the compiler output on Windows, or even pipe it.
May 22 2012
On Tuesday, 22 May 2012 at 17:47:18 UTC, Dmitry Olshansky wrote:Check both stdout & stderr. There is something funny with the way they are setup on Windows.Ahh... on my home laptop, it must go to stderr, on my work laptop, stdout. Thanks!
May 22 2012
On 22/05/2012 18:36, cal wrote: <snip>By "something similar" do you mean a way of piping stderr, or a head utility? A head utility is trivial to code. Of course, a way to pipe stderr is another matter.<my build command> 2>&1 | head -n <number of lines you want to see> Where <my build command> is your dmd/rdmd/build script command. There's probably something similar you could use on Windows, I don't really know though.They are probably all valid errors, I am porting a rather large C file to D and it takes a few seconds (perhaps 10 seconds) for the compiler to finish listing all the things I haven't fixed up yet, makes the process a bit more tedious is all. No biggy, thought there might be a switch I missed. Interestingly, I don't seem able to redirect the compiler output on Windows, or even pipe it.What version of Windows are you using? Modern versions support 2> to redirect stderr to a file. But 2| doesn't seem to work correspondingly (at least under Vista, don't know about Win7) - by the looks of it it just passes 2 as an argument to the program and pipes stdout as usual. Maybe a utility could be made along similar lines to Rederr (which I published somewhere on these 'groups OUAT).... Stewart.
May 27 2012
On Sunday, 27 May 2012 at 18:31:53 UTC, Stewart Gordon wrote:What version of Windows are you using? Modern versions support 2> to redirect stderr to a file. But 2| doesn't seem to work correspondingly (at least under Vista, don't know about Win7) - by the looks of it it just passes 2 as an argument to the program and pipes stdout as usual. Maybe a utility could be made along similar lines to Rederr (which I published somewhere on these 'groups OUAT)....Win7. Yeah, using 2> works like you say to redirect, I hadn't tried piping, it might need to be redirected first, something like 2>&1.
May 27 2012
On 5/20/12, cal <callumenator gmail.com> wrote:Is there a way to limit the dmd compiler to outputting just the first few errors it comes across?If you're getting a ton of unrelated errors it might be related to this: http://d.puremagic.com/issues/show_bug.cgi?id=8082 I regularly get hundreds of lines of errors due to that issue.
May 22 2012