[m-rev.] for post-commit review: explicit streams 1

Julien Fischer jfischer at opturion.com
Sat Aug 21 01:10:01 AEST 2021



On Thu, 19 Aug 2021, Zoltan Somogyi wrote:

> For review by anyone.
>
> I do have a broader question for everyone on a topic
> related to this diff. In october last year, I set up five streams
> when output related to a module should go. Error output
> was one of the five. However, we did not discuss exactly
> what kinds of errors are covered. By far the most frequently
> encountered errors are syntactic and semantic errors
> in source files, for which we now generate error_specs,
> and then print these error_specs to the module's error stream.
> But there can also be errors when opening a file for
> either reading or writing, and these are different, for at least
> two reasons. First, if you want to print error messages about
> semantic errors in e.g. module1.m to module1.err, you
> cannot print an error message about being unable to open
> module1.err for writing to module1.err :-) Second, even if
> you could write error messages about file open/read/write
> operations to a .err file, you probably wouldn't want to.
> Writing them to stderr is more likely to get the user's attention,
> and in this case, I think that is a good thing.
>
> So I think we should establish a rule that failure to open, read
> or (possibly) write to a file will result in the error message
> being printed to stderr. Any objections?

No objections from me.

The diff looks fine.

Julien.


More information about the reviews mailing list