[m-rev.] for review: extend the use of library grade install checks

Julien Fischer jfischer at opturion.com
Thu Sep 19 15:16:24 AEST 2019


Hi Zoltan,

On Thu, 19 Sep 2019, Zoltan Somogyi wrote:

> On Sat, 14 Sep 2019 02:12:53 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
>> Perform library grade install checks when the compiler is invoked on a single
>> source file linked target; previously we only performed this checks when using
>> mmc --make.
>
> I presume the intention is to provide context for any linker error messages
> that arise from missing installed grades?

You shouldn't ever get as far as the linker.  In C grades, the error you
get at the moment is from mkinit, e.g. something like:

    mkinit: error opening file `/home/jfischer/mercury/rotds/rotd-2019-09-15/lib/mercury/modules/reg.gc/mer_rt.init': No such file or directory
    mkinit: error opening file `/home/jfischer/mercury/rotds/rotd-2019-09-15/lib/mercury/modules/reg.gc/mer_std.init': No such file or directory

With the library grade install checks you get:

    mercury_compile: error: the Mercury standard library cannot be found in grade reg.gc.

(mmc --make has produced the latter message for several years now.)

>> +maybe_check_libraries_are_installed(Globals, Succeeded, !IO) :-
>> +    globals.lookup_bool_option(Globals, libgrade_install_check,
>> +        LibgradeCheck),
>> +    (
>> +        LibgradeCheck = yes,
>> +        globals.lookup_accumulating_option(Globals, mercury_libraries, Libs),
>> +        grade_directory_component(Globals, Grade),
>
> I would s/Grade/GradeDirName/ here. While the directory names
> are the same as the grades themselves for now, conceptually, they
> are different things.

Done.

Julien.


More information about the reviews mailing list