[m-rev.] for review/discussion: Raise default value of --output-compile-error-lines.
Mark Brown
mark at mercurylang.org
Thu Jul 25 13:45:23 AEST 2024
On Thu, Jul 25, 2024 at 12:31 PM Peter Wang <novalazy at gmail.com> wrote:
>
> Raise default value of --output-compile-error-lines.
>
> I believe the default value of --output-compile-error-lines (15)
> is set too low, causing mmc --make to truncate compiler output very
> often, requiring the user to open up .err files to see the rest of the
> messages, or running mmc --make again with a higher value of
> --output-compile-error-lines. Both are inconvenient.
Both the change and the rationale seem fine to me.
The main thing I really want is for singleton variable warnings to be
prominent, since they're often accompanied by large mode or
type-ambiguity errors. Noticing the singleton warning typically saves
me a lot of effort in reading the rest of the errors, so it would be
good if they don't scroll too far off screen.
Cheers,
Mark
>
> Of course, you could (and can still) set --output-compile-error-lines in
> the Mercury.options file of your project, but raising the default limit
> should be an improvement for most users.
>
> compiler/options.m:
> Raise the default value of --output-compile-error-lines to 100.
> This is intended to be a big enough value that it won't be hit
> all the time, yet not so large as to make
> --output-compile-error-lines irrelevant.
>
> doc/user_guide.texi:
> Update documentation.
>
> NEWS.md:
> Announce change.
>
> diff --git a/NEWS.md b/NEWS.md
> index 4ae751b2a..dd483d6fa 100644
> --- a/NEWS.md
> +++ b/NEWS.md
> @@ -1268,6 +1268,8 @@ Changes to the Mercury compiler
> that tells the compiler to generate warnings for type conversions
> from one type to the same type. This option is enabled by default.
>
> +* We have raised the default value of `--output-compile-error-lines` to 100.
> +
> * We have added a new option `--reverse-error-order` that tells the compiler
> to output error messages for higher line numbers before error messages
> for lower line numbers.
> diff --git a/compiler/options.m b/compiler/options.m
> index 3485167dc..526319d6c 100644
> --- a/compiler/options.m
> +++ b/compiler/options.m
> @@ -1385,7 +1385,7 @@ optdef(oc_verbosity, verbose_recompilation, bool(no)).
> optdef(oc_verbosity, find_all_recompilation_reasons, bool(no)).
> optdef(oc_verbosity, verbose_make, bool(yes)).
> optdef(oc_verbosity, verbose_commands, bool(no)).
> -optdef(oc_verbosity, output_compile_error_lines, maybe_int(yes(15))).
> +optdef(oc_verbosity, output_compile_error_lines, maybe_int(yes(100))).
> optdef(oc_verbosity, report_cmd_line_args, bool(no)).
> optdef(oc_verbosity, report_cmd_line_args_in_doterr, bool(no)).
> optdef(oc_verbosity, statistics, bool(no)).
> @@ -4694,7 +4694,7 @@ options_help_verbosity(Stream, !IO) :-
> "--output-compile-error-lines <n>",
> "--no-output-compile-error-lines",
> "\tWith `--make', output the first <n> lines of the `.err'",
> - "\tfile after compiling a module (default: 15).",
> + "\tfile after compiling a module (default: 100).",
> "\tSpecifying --no-output-compile-error-lines removes the limit.",
> "--report-cmd-line-args-doterr",
> "\tReport the command line arguments.",
> diff --git a/doc/user_guide.texi b/doc/user_guide.texi
> index 050f4a4c0..05e14881f 100644
> --- a/doc/user_guide.texi
> +++ b/doc/user_guide.texi
> @@ -7122,7 +7122,7 @@ not just the first. Implies @samp{--verbose-recompilation}.
> @findex --output-compile-error-lines
> @findex --make
> With @samp{--make}, output the first @var{n} lines of the @samp{.err}
> -file after compiling a module (default: 15).
> +file after compiling a module (default: 100).
> Specifying --no-output-compile-error-lines removes the limit.
>
> @sp 1
> --
> 2.44.0
>
> _______________________________________________
> reviews mailing list
> reviews at lists.mercurylang.org
> https://lists.mercurylang.org/listinfo/reviews
More information about the reviews
mailing list