[m-rev.] for review: check library install just once

Julien Fischer jfischer at opturion.com
Wed Jan 12 16:09:44 AEDT 2022


On Wed, 12 Jan 2022, Zoltan Somogyi wrote:

>
> 2022-01-12 15:48 GMT+11:00 "Julien Fischer" <jfischer at opturion.com>:
>>> +            % We used to do this check once per compiler arg, which was
>>> +            % quite wasteful.
>>> +            %
>>> +            % We also used to do this check, as we are we doing now,
>>> +            % only when InvokedByMake = no. I, zs, don't know why, though
>>> +            % I *guess* that it may be that the compiler invocation that *set*
>>> +            % --invoked-by-mmc-make may have done it already.
>>
>> It may be because the library grade check was extended to work when compiling
>> single module programs using mmc directly, instead of just when using --make.
>> (From the looks of it that fact is not documented at the moment.)
>
> Extended from what?

The original version of library grade checks *only* worked with
mmc --make.  Commit ad93762 added the ability for simple invocations
of the compiler to also do the check, e.g. so we get a useful error
if a user attempts to do:

    $ mmc --debug hello.m

and the stdlib is not installed in an appropriate debug grade.

> If it was intended for single-module programs, then it is ironic
> that the reason this came to my attention is that, due to a bug
> in an as-yet-unfinished change, I got a dozen copies of the
> same "standard library not installed" error message for ONE
> invocation of mmc -f *.m, one for each module in the directory
> (mdbcomp).

We shouldn't be doing the check at all when building source file
mappings -- it's definitely a bug if we are.

Julien.


More information about the reviews mailing list