[m-rev.] for post-commit review: color in add_pragma.m

Julien Fischer jfischer at opturion.com
Sun May 12 23:19:19 AEST 2024


On Sun, 12 May 2024, Zoltan Somogyi wrote:

> Use color in add_pragma. and add_mutable_aux_preds.m.
> 
> compiler/add_mutable_aux_preds.m:
> compiler/add_pragma.m:
>     Add color to the diagnostics generated by these modules.
>
>     In a few cases, improve the wording of the diagnostic.

...

> tests/invalid/bug83.err_exp:
> tests/invalid/external2.err_exp:
> tests/invalid/inline_conflict.err_exp:
> tests/invalid/inline_conflict_warn.err_exp:
> tests/invalid/invalid_export_detism.err_exp:
> tests/invalid/test_feature_set.err_exp:
> tests/invalid/uniq_mutable.err_exp:
> tests/invalid_nodepend/bad_fact_table.err_exp:
> tests/invalid_nodepend/bad_fact_table.err_exp2:
> tests/invalid_nodepend/bad_mutable.err_exp:
> tests/invalid_nodepend/pragma_export.err_exp:
> tests/warnings/pragma_term_conflict.err_exp:
>     Expect updated diagnostics.
> 
> diff --git a/tests/invalid/bug83.err_exp b/tests/invalid/bug83.err_exp
> index c66ea1236..701e514cb 100644
> --- a/tests/invalid/bug83.err_exp
> +++ b/tests/invalid/bug83.err_exp
> @@ -1,7 +1,7 @@
> -bug83.m:027: Error: ambiguous function name in `:- pragma foreign_export'
> +bug83.m:027: Error: ambiguous function name in `:- pragma foreign_export'

I suggest using color_subject on ":- pragma foreign_export".

>  bug83.m:027:   declaration.
>  bug83.m:027:   The possible matches are:
> -bug83.m:027:     function `io.make_io_error'/1,
> -bug83.m:027:     function `bug83.make_io_error'/1.
> +bug83.m:027:     function `io.make_io_error'/1,
> +bug83.m:027:     function `bug83.make_io_error'/1.
>  bug83.m:027:   An explicit module qualifier may be necessary to select the
>  bug83.m:027:   right match.

...

> diff --git a/tests/invalid/inline_conflict.err_exp b/tests/invalid/inline_conflict.err_exp
> index 5af1c2517..200bc0d7c 100644
> --- a/tests/invalid/inline_conflict.err_exp
> +++ b/tests/invalid/inline_conflict.err_exp
> @@ -1,2 +1,2 @@
> -inline_conflict.m:019: Error: `:- pragma no_inline' declaration conflicts with
> -inline_conflict.m:019:   previous inline pragma for `bar'/2.
> +inline_conflict.m:019: Error: `:- pragma no_inline' declaration conflicts with
> +inline_conflict.m:019:   previous inline pragma for `bar'/2.

Unrelated: it might be nice to give the context for the previous inline pragma
in the message as well.

The rest looks fine.

Julien.



More information about the reviews mailing list