[m-rev.] for post-commit review: source_file_map.m

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu Jul 17 01:28:49 AEST 2025



On Thu, 17 Jul 2025 01:05:38 +1000, Julien Fischer <jfischer at opturion.com> wrote:

> On Wed, 16 Jul 2025 at 19:24, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
> > +                % It would be nice if our callers told us the stream
> > +                % to which this error should be reported, but for many of them,
> > +                % this would require a nontrivial amount of complication
> > +                % that this very rare error probably does not deserve.
> > +                bimap.init(SourceFileMap),
> > +                io.stderr_stream(StdErr, !IO),
> > +                io.write_strings(StdErr, ErrorMsgs, !IO),
> > +                io.write_string(StdErr,
> > +                    "You need to rebuild Mercury.modules.\n", !IO)
> 
> Do we need to set the exit status to non-zero value at this point?

That's what write_error_spec would do. I would have called that,
instead of io.write_strings, if it didn't need a bunch of callers passing us
a globals structure. And there is no point in "optimizing" it away.

> The rest looks fine.

Thanks. I followed all your other suggestions.

Zoltan.





More information about the reviews mailing list