[m-rev.] for review: proposed reclassification of options

Julien Fischer jfischer at opturion.com
Mon Jun 2 23:21:34 AEST 2025


On Mon, 2 Jun 2025 at 08:15, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
>
> The first attached file is an extract from the current options.m.
> The second is that same file with additions outlining the changes
> I am proposing to make. The third is the diff between them.
>
> I am proposing some new option categories and subcategories,
> which I hope the attached file defines adequately. I am also
> proposing to reclassify many options, some into the new
> categories, some into existing ones, and in two cases, I am proposing
> that what are now warnings should become errors, which cannot be
> switched off by options (so the options can be deleted).
>
> I am posting this proposal in this form, because a fully implemented
> proposal would also include moving the affected option's help text,
> which would be unhelpful clutter in the diff.
>
> For review by everyone, mostly because I am not sure about the
> intended limitations on the use of some options. Specifically,
> I am not clear about which otherwise-internal-use-only options
> are actually expected to be used by programmers when doing
> cross-compilation. I am therefore also not sure whether it would
> be worth creating a new option category, with associated new section
> in the help text (and the user guide) specifically for such options.
>
> In the absence of a review, or a promise of one, in the next 24 hours,
> I will assume that noone has any objections to the proposal, and
> will then construct and commit the full version.

That looks reasonable to me, with one comment below.

> --- OPTDEF0    2025-06-01 19:44:15.000000000 +1000
> +++ OPTDEF    2025-06-02 06:40:26.000000000 +1000

...

> @@ -871,25 +897,31 @@
>  optdef(oc_misc, filenames_from_stdin,                   bool(no)).
>  optdef(oc_misc, typecheck_ambiguity_warn_limit,         int(50)).
>  optdef(oc_misc, typecheck_ambiguity_error_limit,        int(3000)).
> -optdef(oc_misc, help,                                   bool(no)).
> +make oc_help a new category, the first, containing just this option
> +    because it should be listed first, in a section of its own
> +optdef(oc_misc, help,                                   bool(no)). => oc_help
>  optdef(oc_misc, version,                                bool(no)).
>  optdef(oc_misc, target_arch,                            string("")).
> +% Should we have a section containing this option, and all the others
> +% that are useful ONLY when cross compiling?
>  optdef(oc_misc, cross_compiling,                        bool(no)).

The cross_compiling option no longer does anything and is no longer documented.
Depending on when it was undocumented, it can probably be removed.

All of the other "cross compilation" options are also config options.
(Currently, the way to set up a Mercury cross compiler is by
setting the values in the configuration script as per tools/configure_cross.)

Julien.


More information about the reviews mailing list