You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For information: I'm running everything on the latest master branch at the time of writing (2020-04-15)
The output of ott in case of error is often inconsistent in its dispatch between stdout and stderr.
For example if you run ott without any file, just ott, The output is:
stdout:
Ott version 0.30 distribution of Sun 24 Nov 2019 21:57:16 CET
Error:
Error: must specify either some source filenames or a readsys option
stderr:
usage:
- sdafasdf
- fdsafssff
- sdfasffdd
Which is annoying because you can't split sensibly the output. Furthermore, the output is colored even when piping the output in a file.
If you run ott on an incorrect file like ott wrong.ott, you have output only on stdout
Ott version 0.30 distribution of Sun 24 Nov 2019 21:57:16 CET
line 0, column -1 - -1:
Error:
Problem parsing: syntax error
and nothing on stderr
But if you run ott on an file with a wrong extension like ott wrong, you have:
stdout:
Ott version 0.30 distribution of Sun 24 Nov 2019 21:57:16 CET
stderr:
Fatal error: exception Auxl.Located_Failure(0, "
Error: unrecognised extension of input file "wrong" (must be one of ott,tex,mll,mly,v,thy,sml,lem,twf,ml)
")
It seem that when the error reporting is done by Ocaml like uncatched exception or command line library, the output is indeed on stderr, but when the error reporting is manual, it's done on stdout.
When trying to integrate ott in a build system or automated script this is particularly annoying.
And finally on a less important note. It would be nice if ott could be consistent with other compiler interfaces, in particular by not printing anything when successfully processing files like gcc, ocamlc, ocamlopt, menhir, ... In particular the version message could be only delivered on request with a version option.
The text was updated successfully, but these errors were encountered:
For information: I'm running everything on the latest master branch at the time of writing (2020-04-15)
The output of ott in case of error is often inconsistent in its dispatch between stdout and stderr.
For example if you run ott without any file, just
ott
, The output is:Which is annoying because you can't split sensibly the output. Furthermore, the output is colored even when piping the output in a file.
If you run ott on an incorrect file like
ott wrong.ott
, you have output only on stdoutand nothing on stderr
But if you run ott on an file with a wrong extension like
ott wrong
, you have:It seem that when the error reporting is done by Ocaml like uncatched exception or command line library, the output is indeed on stderr, but when the error reporting is manual, it's done on stdout.
When trying to integrate ott in a build system or automated script this is particularly annoying.
And finally on a less important note. It would be nice if ott could be consistent with other compiler interfaces, in particular by not printing anything when successfully processing files like gcc, ocamlc, ocamlopt, menhir, ... In particular the version message could be only delivered on request with a version option.
The text was updated successfully, but these errors were encountered: