Discussion:
ASDF Issue with compiler warnings on ABCL
Robert Goldman
2017-07-20 22:10:25 UTC
Permalink
ASDF wraps its compilation process with WITH-COMPILATION-UNIT.

On at least some implementations, this is necessary so that building
doesn't emit spurious undefined function (variable, etc.) warnings.

However, on ABCL, using WITH-COMPILATION-UNIT has the side effect of
causing warnings to be intercepted and handled by HANDLE-WARNING. Then
it seems that *resignal-compiler-warnings* is bound to NIL, and the
compiler swallows them, instead of allowing them to flow down the stack
to ASDF's handlers.

In turn, this causes at least some of our regression tests to fail,
because they check for expected warnings.

This looks to me like a bug, but perhaps it's a feature ;-) Would you
please explain and let us know how to handle this?

thanks,
r
Mark Evenson
2017-07-22 10:04:25 UTC
Permalink
Post by Robert Goldman
ASDF wraps its compilation process with WITH-COMPILATION-UNIT.
On at least some implementations, this is necessary so that building
doesn't emit spurious undefined function (variable, etc.) warnings.
However, on ABCL, using WITH-COMPILATION-UNIT has the side effect of
causing warnings to be intercepted and handled by HANDLE-WARNING. Then
it seems that *resignal-compiler-warnings* is bound to NIL, and the
compiler swallows them, instead of allowing them to flow down the stack
to ASDF's handlers.
In turn, this causes at least some of our regression tests to fail,
because they check for expected warnings.
This looks to me like a bug, but perhaps it's a feature ;-) Would you
please explain and let us know how to handle this
I am not entirely clear about why ABCL seemingly swallows compiler
warnings by default. Such behavior may be historical, having something
to do with getting an ancient version of SLIME working, but that is just
a guess.

I am on a road trip at the moment, returning from surfing in the Bay of
Biscay, so my time and access to resources address your issue is rather
limited. I anticipate having time to provide a provisional answer early
next week.
--
"A screaming comes across the sky. It has happened before, but there
is nothing to compare to it now."
Mark Evenson
2017-08-18 22:02:43 UTC
Permalink
Post by Mark Evenson
Post by Robert Goldman
ASDF wraps its compilation process with WITH-COMPILATION-UNIT.
On at least some implementations, this is necessary so that building
doesn't emit spurious undefined function (variable, etc.) warnings.
However, on ABCL, using WITH-COMPILATION-UNIT has the side effect of
causing warnings to be intercepted and handled by HANDLE-WARNING. Then
it seems that *resignal-compiler-warnings* is bound to NIL, and the
compiler swallows them, instead of allowing them to flow down the stack
to ASDF's handlers.
In turn, this causes at least some of our regression tests to fail,
because they check for expected warnings.
This looks to me like a bug, but perhaps it's a feature ;-) Would you
please explain and let us know how to handle this
I am not entirely clear about why ABCL seemingly swallows compiler
warnings by default. Such behavior may be historical, having something
to do with getting an ancient version of SLIME working, but that is just
a guess.
I am on a road trip at the moment […]
Seemingly back from my summer break, I can confirm that [Faré's patch][
Fix two tests on ABCL] is the best we can do at the moment.

The generalized boolean JVM:*RESIGNAL-COMPILER-WARNINGS* controls
whether the compiler emits diagnostics to the standard reporting stream
as text or signals conditions, with the default being not to signal.

[I have patched][compiler signals] ABCL trunk to both document this
better as well as exporting the symbol.

[Fix two tests on ABCL]:
https://gitlab.common-lisp.net/asdf/asdf/commit/026ceaea53a35bad04a75c13caa3eb0cc4f02251

[compiler signals doc]:
https://gitlab.common-lisp.net/abcl/abcl/commit/56735922d2773d3ab40a5535a09ee91a69f756ee
--
"A screaming comes across the sky. It has happened before, but there
is nothing to compare to it now."
Loading...