[m-rev.] for review: Move some code to new io.error_util module.

Peter Wang novalazy at gmail.com
Fri Jan 13 18:53:48 AEDT 2023


On Fri, 13 Jan 2023 18:00:25 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> 
> 2023-01-13 17:08 GMT+11:00 "Peter Wang" <novalazy at gmail.com>:
> > This reduces the size of io.m a bit.
> 
> That's good.
> 
> > The other reason for moving the
> > code is to allow modules that occur in a dependency cycle with io.m
> > to read results from io.error_util.trans_opt, whereas they may have
> > been prevented from reading io.trans_opt.
> 
> Have you verified whether that is the case? I think the diff is worthwhile
> whatever the answer is; I am just curious.

Yes. Without using trans-opt-deps-specs, the only improvement is to
io.call_system.

With trans-opt-deps-specs, analysis results for some io.file predicates
are also improved (at least, with the way I broke up the SCC).

> 
> > library/io.m:
> > library/io.error_util.m:
> >     Move is_error, throw_on_error and other similar predicates to a
> >     new undocumented submodule of io.m.
> > 
> >     Also move the support functions/predicates used by those predicates.
> > 
> >     Add forwarding predicates for the predicates that are part of the
> >     io.m public interface.
> 
> The diff contains no such forwarding predicates, since they are not needed.

That was referring to io.make_io_error_from_system_error and
io.make_io_error_from_windows_error. I'll reword it.

Peter


More information about the reviews mailing list