[m-rev.] for review/discussion: Raise default value of --output-compile-error-lines.
Peter Wang
novalazy at gmail.com
Thu Jul 25 12:24:15 AEST 2024
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.
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
More information about the reviews
mailing list