bug#74385: [PATCH 4/4] srfi-64: Report failed tests in (standards)Errors format.

Tomas Volf <[email protected]> Fri, 13 Dec 2024 17:05:59 +0100
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
Ludovic Courtès <[email protected]> writes:

> Tomas Volf <[email protected]> skribis:
>
>> There is a page in the GNU Standards document regarding the format of error
>> messages.  Both GNU Emacs and Vim are able to parse it and support jumping to
>> next/previous error.  My version did not produce a line in this format for
>> failed tests and this commit rectifies that.
>>
>> * module/srfi/srfi-64.scm (test-on-test-end-simple)[non-passed]: Write
>> out (standards)Errors compatible line.
>>
>> Reported-by: Janneke Nieuwenhuizen <[email protected]>
>
> I personally like this but my gut feeling is that we may want to stick
> to whatever the previous SRFI-64 implementation was doing, to avoid
> disruption or breakage for users (remember we’re applying this to a
> stable series).

I agree that the output of the simple test runner of the current and the
reference versions do differ, by necessity.  I tested the change in
Emacs and it seems to work out of the box, the compilation buffer
correctly navigates to the locations.

However I understand your worries regarding the stable series.  What I
would suggest is that I can extract the test runner from the reference
implementation, and package it as reference/test-runner-simple.  User
then could, with a simple code change, use it instead of the new
compliant runner.

I would even go as far as to provide a mechanism to select the runner by
environment, so GUILE_SRFI64_DEFAULT_TEST_RUNNER=reference would cause
test-runner-factory to return reference/test-runner-simple.  If unset or
empty value, it would use the new runner as it does now.  This will
allow restoring the previous output format even with no code changes.

Combined with NEWS entry, that could be sufficient?  What do you think?

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
signature.asc (application/pgp-signature, 853 B)
-----BEGIN PGP SIGNATURE-----

iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmdcW2cOHH5Ad29sZnNk
ZW4uY3oACgkQL7/ufbZ/wakEng/+M29jVvhfByzd4JpTyRq6t8IEn4VflPeodCox
sIv2pWrP/rIUeOxCHpHKnvEaQhtIwmOlKAYJogJE0h/3Vdb+0x/mEdZEI0yPHmp+
nhbX+TpNYs6XoYh3fV7fhq9yfR8wBIBZB4uVCnqUsooQVt4biZz1OIe33mj7kUQG
IUYNs6c3MXn3iwBsBZsrk0nFqu9WSCtQDlRdequ4A9AiOle0WwXja+jXdZGmLKtl
vKPJTX40w2PH6HgetDW/cQCfXzZywvNBoh+UGd1aC2zYlMdLxefG8wYEdGb1F5pr
ZaydyI8t0KZ3890g5Aw/tYWHl0jW8LYq2pndSXQU3VJdzT8DvGpTB0IsTO9y7OfI
LdcfOW2VCCnZfXuN9JI8V84T8yupt8GMY9IX8ugWdP3NPfPSwMZvBw/8Z7DDxF8O
VLf9eT1/tvGjQHw8nV9pUDUeI/C55TkejPeRO+u4P4nlppBiZL9f6yQS9Cl41A5N
PkHr03POzvew8GkNOGBggjly70FGaDtpYE8c+f94YHQfSLyOI9jGIh6bL3z41e9i
K3/tZsHUZtTqW5AGC9uOBaDOL50zOeuoF2x1efQDjfmLQrlWASSzPe6k/kRmT4AR
pCwZXmhL/OKzvmvlxp37elDx/CVZFixQd8+EcehGRdph0Ygs6MEJH30Y6lBFpmqr
f0ckqks=
=vB1C
-----END PGP SIGNATURE-----