Olivier Dion <[email protected]> writes:

>>> Finally, note that I did some improvement on the message reporting side
>>> of the compiler.  Mainly in the reader and on the CPS analyze passes.
>>> If your program/tests rely on message layout for these, this could be
>>> considered a regression.  However, I think that these improvement are
>>> very important and much welcomed by the users.  So if you can add
>>> workarounds for this kind of regression, that would be great.
>>
>> I agree the new warnings/errors look pretty and are probably useful for
>> interactive use in a terminal, however in CI they complicate suppressing
>> warnings (due to every message being multiple lines).
>>
>> My current thinking is basically to put following grep before the one I
>> already have, but that is prone to false positives.
>>
>>     grep -vEe '^ +| +\^~+' -e '^ +[0-9]+ +|'
>
> You can disable individual warnings with `-Wno-' flags.  Also, there is
> a fluid that set the current warning prefix.  This is not exposed to
> users AFAIK but we could expose it somehow so that you can easily filter
> any line that start with that prefix.
>
> Could this be working for you?

The problem is that Guile currently offers no mechanism to suppress
specific *instances* of a warning.  So, e.g. I in general do want the
`unused variable' warnings to be emitted, but some of them cannot be
addressed (e.g., warning: unused variable `failure'), -Wno will not
help.

I have adopted similar mechanism Valgrind has, a suppression list (in my
case pretty much `grep -xvFf') per .scm file.  I just pipe the warnings
through it to see the list of "real" warnings.

For this filtering to work, I need to be able to somehow process the
warnings one-by-one.  Currently that just means line-by-line, but I am
unsure how to do that in the new fancy format.  If the fluid would allow
somehow annotate the warning so that I could once again process them
one-by-one, that would suffice, but if it is just a prefix, I am unsure
how that will work.  If the fluid would allow placing a marker before
and after a full warning (so before first, and after last line), that
would be great and suffice for my needs.

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

Attachment: signature.asc
Description: PGP signature

Reply via email to