[m-rev.] fix mantis #308
Paul Bone
paul at bone.id.au
Sat Feb 1 18:17:09 AEDT 2014
On Fri, Jan 31, 2014 at 03:47:05PM +1100, Zoltan Somogyi wrote:
>
> For review by anyone.
>
Thanks Zoltan.
Hi Matthias, I've added you to this e-mail discussion because it concerns
your work on flycheck-mercury.
I know that the feature request asks for a --no-max-error-line-width option,
which is what this patch implements. However I'm concerned that the fix
doesn't address the reason why the feature request was posted (which should
have been described in the bug).
The intention of this change is to better support any program that
post-processes mmc's output. In this case to make Mercury support in the
flycheck-mode for emacs simpler by putting each error message on a single
line. (I think you (Zoltan) and I may be the only people who use the
"error" program.)
> diff --git a/tests/invalid/any_to_ground_in_ite_cond_nomax.err_exp b/tests/invalid/any_to_ground_in_ite_cond_nomax.err_exp
> new file mode 100644
> index 0000000..6136a71
> --- /dev/null
> +++ b/tests/invalid/any_to_ground_in_ite_cond_nomax.err_exp
> @@ -0,0 +1,6 @@
> +any_to_ground_in_ite_cond_nomax.m:036: In clause for `main(di, uo)':
> +any_to_ground_in_ite_cond_nomax.m:036: in argument 1 of call to predicate `any_to_ground_in_ite_cond_nomax.p'/1:
> +any_to_ground_in_ite_cond_nomax.m:036: scope error: attempt to bind a non-local variable inside the condition of an if-then-else.
> +any_to_ground_in_ite_cond_nomax.m:036: Variable `X' has instantiatedness `any',
> +any_to_ground_in_ite_cond_nomax.m:036: expected instantiatedness was `ground'.
> +For more information, recompile with `-E'.
Are error messages made up from different paragraphs? There are multiple
lines in this error message.
Given that the patch looks good (I did review it and found nothing to
comment on) and it does do what it says it does it should probably still be
committed (I suggest the onto the version-14.01-branch branch). But perhaps
one of us (probably me) should add a new option --one-line-per-error-message
(or similar) that addresses the problem that Matthias Güdemann, the
flymake-mercury author, was having.
Matthias, Zoltan has added a --no-max-error-line-width to Mercury. However
my guess is that it doesn't quite do what you want, it appears that there
are no line limits in the error messages but there are still multiple lines
per error. Does this address the problem you were having or do you need all
the newlines removed?
Thanks.
--
Paul Bone
http://www.bone.id.au
More information about the reviews
mailing list