bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: incomplete warning message


From: Ralf Wildenhues
Subject: Re: incomplete warning message
Date: Mon, 20 Sep 2010 22:59:53 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

Hi Eric,

* Eric Blake wrote on Mon, Sep 20, 2010 at 10:36:00PM CEST:
> On 09/20/2010 02:14 PM, Eric Blake wrote:
> >Hmm, reading lib/Autom4te/Channels.pm is proving to be enlightening:
> 
> > Maybe the solution is just to teach autom4te that warning outputs
> > consist of partial messages.
> 
> Does this look sane?

Yes, that looks sane, thanks.  Remember that each `partial => 1' message
must be finished by a non-partial part, otherwise it may not be seen.

> Since my perl is weak, are there any
> suggestions on more robust ways to express this action?

Searching for newlines in the first regex?  You want it to be partial
exactly if you print more lines.

> I'm also working on a testsuite addition, to make sure we don't
> regress in the future.

You should try to test both one-line and multi-line messages.

Gee, I vaguely remember having a similar patch in my tree somewhere, but
I can't find it now.

Cheers,
Ralf

> +     autom4te: don't filter out portions of location traces
> +     * bin/autom4te.in (_m4_warn): Pass warnings through the channels
> +     machinery as a single chunk, to avoid partial filtering.
> +     Reported by Bruno Haible.

> --- i/bin/autom4te.in
> +++ w/bin/autom4te.in
> @@ -1022,11 +1022,11 @@ for (split (/\n*$separator\n*/o, contents
> ("$tmp/warnings")))
>    # | input.as:3: foo is expanded from...
>    # | input.as:5: the top level
>    my ($cat, $loc, $msg, $stacktrace) = split ('::', $_, 4);
> -  msg $cat, $loc, "warning: $msg";
> +  msg $cat, $loc, "warning: $msg", partial => ($stacktrace =~ /top
> level/) + 0;
>    for (split /\n/, $stacktrace)
>      {
>        my ($loc, $trace) = split (': ', $_, 2);
> -      msg $cat, $loc, $trace;
> +      msg $cat, $loc, $trace, partial => ($trace !~ /top level/) + 0;
>      }
>  }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]