www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - errors should go to stderr

reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
That is, all the errors:

1) DMD errors and warnings. (has been fixed in GDC already)
    http://www.algonet.se/~afb/d/diffs/dmd-0.140-gdc-0.17.diff.gz

2) Phobos errors and exceptions.
    digitalmars.D.bugs/2001
    digitalmars.D.bugs/3170

Currently they are printed to stdout, which is just plain *wrong*.

Another 1.0 showstopper...
--anders
Dec 14 2005
next sibling parent reply =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= <jmjmak utu.fi.invalid> writes:
Anders F Björklund wrote:
 That is, all the errors:
 
 1) DMD errors and warnings. (has been fixed in GDC already)
    http://www.algonet.se/~afb/d/diffs/dmd-0.140-gdc-0.17.diff.gz
 
 2) Phobos errors and exceptions.
    digitalmars.D.bugs/2001
    digitalmars.D.bugs/3170
 
 Currently they are printed to stdout, which is just plain *wrong*.
 
 Another 1.0 showstopper...
 --anders

Luckily this is easy to fix.
Dec 14 2005
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Jari-Matti Mäkelä wrote:

 Currently they are printed to stdout, which is just plain *wrong*.


 Luckily this is easy to fix.

That is what *you* think :-) It's been several years since this particular bug was first reported. --anders
Dec 14 2005
next sibling parent reply =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= <jmjmak utu.fi.invalid> writes:
Anders F Björklund wrote:
 It's been several years since this particular bug was first reported.

Yes, I know. I think it's not priority number one on Walters bugfix list since (AFAIK) Walter develops DMD mainly on Windows platform. Windows 9x and DOSes do not fully support stderr.
Dec 14 2005
next sibling parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Jari-Matti Mäkelä wrote:

 Windows 9x and DOSes do not fully support stderr.

Does Windows NT (2K/XP) have a sane shell ? Great! As I recall it Windows 9x also had Unicode issues... --anders
Dec 14 2005
parent =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= <jmjmak utu.fi.invalid> writes:
Anders F Björklund wrote:
 Jari-Matti Mäkelä wrote:
 
 Windows 9x and DOSes do not fully support stderr.

Does Windows NT (2K/XP) have a sane shell ? Great!

I haven't been using Windows for a while, but AFAIK all WinNT 4/5/... are aware of stderr and stderr redirection. Even DOSes work fine with the help of proprietary extensions (4DOS) or an antificial GNU environment (DJGPP, Cygwin, ...)
 
 As I recall it Windows 9x also had Unicode issues...

I think Windows 9x console doesn't support anything else than 8-bit code pages. :( But that's one big reason why I'm using Linux ;)
Dec 14 2005
prev sibling parent reply Dave <Dave_member pathlink.com> writes:
In article <dnp8l1$11p8$1 digitaldaemon.com>,
=?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= says...
Anders F Björklund wrote:
 It's been several years since this particular bug was first reported.

Yes, I know. I think it's not priority number one on Walters bugfix list since (AFAIK) Walter develops DMD mainly on Windows platform. Windows 9x and DOSes do not fully support stderr.

But they will still output messages 'put' to 'stderr' (even if stderr redirection and such is not fully supported), correct? If so IMO there's no good reason for not changing this behaviour just because D needs to support Win9X. (I mean, forget the "version (Win9X)" type of stuff and just make the change universally). I agree, this really needs to be changed. All of the Linux folks and half the Windows folks would go nuts seeing 'error' information put to stdout, especially from the library routines.
Dec 14 2005
next sibling parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Dave wrote:

 I agree, this really needs to be changed. All of the Linux folks and half the
 Windows folks would go nuts seeing 'error' information put to stdout,
especially
 from the library routines.

I think you mean "have been going", instead of "would go" ;-) --anders
Dec 14 2005
parent Dave <Dave_member pathlink.com> writes:
In article <dnq15l$1ptt$1 digitaldaemon.com>,
=?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= says...
Dave wrote:

 I agree, this really needs to be changed. All of the Linux folks and half the
 Windows folks would go nuts seeing 'error' information put to stdout,
 especially from the library routines.

I think you mean "have been going", instead of "would go" ;-) --anders

Right - 'have been going' <g>. I was thinking ahead to when D really takes off and a bunch of unsuspecting newbies first notice this ... Of course, if errors keep going through stdout, it may never take off ;) At first I accepted it as something that would quickly be taken care of, but now that it hasn't, it's really starting to bug me.. As you said, this "is just plain wrong". - dave
Dec 14 2005
prev sibling parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Dave wrote:
 In article <dnp8l1$11p8$1 digitaldaemon.com>,
 =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= says...
 Anders F Björklund wrote:
 Windows 9x and DOSes do not fully support stderr.


What do you mean by this?
 But they will still output messages 'put' to 'stderr' (even if stderr
 redirection and such is not fully supported), correct? If so IMO there's no
good
 reason for not changing this behaviour just because D needs to support Win9X.
(I
 mean, forget the "version (Win9X)" type of stuff and just make the change
 universally).

How can preventing anybody from _not_ redirecting errors along with normal output possibly constitute supporting Win9x? Your thought process makes little or no sense to me. See digitalmars.D/28449 Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- C++ a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Dec 15 2005
next sibling parent reply =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= <jmjmak utu.fi.invalid> writes:
Stewart Gordon wrote:
 Windows 9x and DOSes do not fully support stderr.


What do you mean by this?

I guess I mean that AFAIK DOS/Win9x silently merges stdout and stderr. Therefore it's very hard to redirect only the other one of them.
Dec 15 2005
parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Jari-Matti Mäkelä wrote:
 Stewart Gordon wrote:
 Windows 9x and DOSes do not fully support stderr.


What do you mean by this?

I guess I mean that AFAIK DOS/Win9x silently merges stdout and stderr. Therefore it's very hard to redirect only the other one of them.

Wrong. stdout and stderr are distinct streams under all versions of DOS and Win32 I've seen. The only difference is that, using built-in shell features, you can redirect only stdout and not stderr. But you can redirect stderr using a third-party tool, e.g. digitalmars.D.announce/1518 Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- C++ a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Dec 15 2005
next sibling parent =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= <jmjmak utu.fi.invalid> writes:
Stewart Gordon wrote:
 Jari-Matti Mäkelä wrote:
 
 Stewart Gordon wrote:

 Windows 9x and DOSes do not fully support stderr.


What do you mean by this?

I guess I mean that AFAIK DOS/Win9x silently merges stdout and stderr. Therefore it's very hard to redirect only the other one of them.

Wrong. stdout and stderr are distinct streams under all versions of DOS and Win32 I've seen.

Sorry, didn't know it precisely. Apparently this all means that Walter really should take a closer look at the patch you submitted previously.
Dec 15 2005
prev sibling parent reply zwang <nehzgnaw gmail.com> writes:
Stewart Gordon wrote:
 Jari-Matti Mäkelä wrote:
 
 Stewart Gordon wrote:

 Windows 9x and DOSes do not fully support stderr.


What do you mean by this?

I guess I mean that AFAIK DOS/Win9x silently merges stdout and stderr. Therefore it's very hard to redirect only the other one of them.

Wrong. stdout and stderr are distinct streams under all versions of DOS and Win32 I've seen. The only difference is that, using built-in shell features, you can redirect only stdout and not stderr. But you can redirect stderr using a third-party tool, e.g. digitalmars.D.announce/1518 Stewart.

stderr can be redirected using "2>".
Dec 16 2005
parent Stewart Gordon <smjg_1998 yahoo.com> writes:
zwang wrote:
 Stewart Gordon wrote:
 Jari-Matti Mäkelä wrote:

 Stewart Gordon wrote:

 Windows 9x and DOSes do not fully support stderr.


What do you mean by this?

I guess I mean that AFAIK DOS/Win9x silently merges stdout and stderr. Therefore it's very hard to redirect only the other one of them.

Wrong. stdout and stderr are distinct streams under all versions of DOS and Win32 I've seen. The only difference is that, using built-in shell features, you can redirect only stdout and not stderr. But you can redirect stderr using a third-party tool, e.g. digitalmars.D.announce/1518 Stewart.

stderr can be redirected using "2>".

We're talking about Win9x here. Are you trying to tell us that there's a version of Win9x in which this works? Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- C++ a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Dec 16 2005
prev sibling parent Dave <Dave_member pathlink.com> writes:
In article <dnrhaq$2qo0$1 digitaldaemon.com>, Stewart Gordon says...
Dave wrote:
 In article <dnp8l1$11p8$1 digitaldaemon.com>,
 =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= says...
 Anders F Björklund wrote:
 Windows 9x and DOSes do not fully support stderr.


What do you mean by this?
 But they will still output messages 'put' to 'stderr' (even if stderr
 redirection and such is not fully supported), correct? If so IMO there's no
good
 reason for not changing this behaviour just because D needs to support Win9X.
(I
 mean, forget the "version (Win9X)" type of stuff and just make the change
 universally).

How can preventing anybody from _not_ redirecting errors along with normal output possibly constitute supporting Win9x? Your thought process makes little or no sense to me. See

That was poorly worded. What I meant was simply that if something like fprintf(stderr,"%.*s\n","someErrorMessage"); still makes it out to the console (which it does), then Win9X shell features not supporting redirection of stderr should not be an issue in making a simple universal change. By universal, I mean w/o regard to Win9X, i.e.: don't version code so a D program running on Win9X would output errors to stdout (so it could be redirected) and stderr everywhere else. Probably still not worded ideally, but better? <g>
Dec 15 2005
prev sibling parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Anders F Björklund wrote:
 Jari-Matti Mäkelä wrote:
 
 Currently they are printed to stdout, which is just plain *wrong*.


 Luckily this is easy to fix.

That is what *you* think :-)

I found it very easy indeed. digitalmars.D.bugs/4368 Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- C++ a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Dec 15 2005
parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Stewart Gordon wrote:

 Luckily this is easy to fix.

That is what *you* think :-)

I found it very easy indeed.

It's not a technical problem, the trick is getting it into DMD... i.e. getting it past Walter ? --anders
Dec 15 2005
prev sibling next sibling parent reply Don Clugston <dac nospam.com.au> writes:
Anders F Björklund wrote:
 That is, all the errors:
 
 1) DMD errors and warnings. (has been fixed in GDC already)
    http://www.algonet.se/~afb/d/diffs/dmd-0.140-gdc-0.17.diff.gz
 
 2) Phobos errors and exceptions.
    digitalmars.D.bugs/2001
    digitalmars.D.bugs/3170
 
 Currently they are printed to stdout, which is just plain *wrong*.
 
 Another 1.0 showstopper...
 --anders

What about pragma(msg, ...)? Maybe it doesn't matter, it's currently unspecified whether it does anything at all.
Dec 14 2005
parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Don Clugston wrote:

 What about pragma(msg, ...)?
 Maybe it doesn't matter, it's currently unspecified whether it does 
 anything at all.

For GDC it's simple, since stuff on stdout gets sent to the assembler ? (This why the old DMD behaviour broke all builds with "gdc -pipe", BTW) So pragma(msg, ...) also goes on stderr. Same as with #warning, for C ? --anders
Dec 14 2005
prev sibling next sibling parent Derek Parnell <derek psych.ward> writes:
On Wed, 14 Dec 2005 11:31:59 +0100, Anders F Björklund wrote:

 That is, all the errors:
 
 1) DMD errors and warnings. (has been fixed in GDC already)
     http://www.algonet.se/~afb/d/diffs/dmd-0.140-gdc-0.17.diff.gz
 
 2) Phobos errors and exceptions.
     digitalmars.D.bugs/2001
     digitalmars.D.bugs/3170
 
 Currently they are printed to stdout, which is just plain *wrong*.

What does 'stderr' stand for? ... Oh, Standard Error, the place where error messages are supposed to go to ... yep its just plain wrong then. -- Derek (skype: derek.j.parnell) Melbourne, Australia 15/12/2005 10:53:06 AM
Dec 14 2005
prev sibling parent reply Sean Kelly <sean f4.ca> writes:
Anders F Björklund wrote:
 That is, all the errors:
 
 1) DMD errors and warnings. (has been fixed in GDC already)
    http://www.algonet.se/~afb/d/diffs/dmd-0.140-gdc-0.17.diff.gz
 
 2) Phobos errors and exceptions.
    digitalmars.D.bugs/2001
    digitalmars.D.bugs/3170
 
 Currently they are printed to stdout, which is just plain *wrong*.
 
 Another 1.0 showstopper...

I wouldn't call it a showstopper, but... this is now fixed in Ares. Sean
Dec 16 2005
next sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Sean Kelly wrote:

 I wouldn't call it a showstopper, but... this is now fixed in Ares.

For GDC it used to be (as it broke -pipe), but maybe it isn't for DMD. Still annoying, though. --anders
Dec 16 2005
prev sibling parent kris <fu bar.org> writes:
Sean Kelly wrote:
 Anders F Björklund wrote:
 Currently they are printed to stdout, which is just plain *wrong*.

 Another 1.0 showstopper...

I wouldn't call it a showstopper, but... this is now fixed in Ares.

And it was never an issue in Mango <g>
Dec 16 2005