[Top][All Lists]

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

Re: Use of ly:expect-warning in regtests

From: Michael Käppler
Subject: Re: Use of ly:expect-warning in regtests
Date: Fri, 2 Oct 2020 15:34:54 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

Am 02.10.2020 um 14:38 schrieb Dan Eble:
Mostly they set it to #f:

git grep "(ly:set-option 'warning-as-error #f" input/regression/* | wc -l
I don't know the history behind that, but it doesn't seem useful.  It could be 
a mistake.
I think I got it.
At first there were neither 'warning-as-error nor ly:expect-warning.

In 2009, 'warning-as-error was introduced in

IIUC the idea was later to enable 'warning-as-error for all regtests to spot
potential failures earlier.
Since some regtests emitted warnings intentionally, there was a issue
for setting 'warning-as-error to #f for these regtests, so that they
would not break

In 2011, ly:expect-warning was introduced with commit
by Reinhold Kainhofer.

Reinhold also adapted the regtests in such a way, that all
expected warnings should be suppressed and remaining warnings
unveil bugs.
However, he left the old (ly:set-option 'warning-as-error #f) code in.
(Don't know why)

tl;dr: I would suggest the following policy:
- do not output expected warnings in regtests, instead use ly:expect-warning
- set 'warning-as-error to #t for these regtests

For all existing regtests: remove (ly:set-option 'warning-as-error #f)

In the long run:
- check the regtests for warnings and figure out, whether
they are intended
 - if they are intended, add ly:expect-warning
- run the regtests with 'warning-as-error to #t, if all snipped are fixed

It seems that this topic has been around from time to time.
Maybe James can tell us, why running the regtests with 'warning-as-error #t
was never realized.


reply via email to

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