[asdf-devel] About asdf:*compile-file-failure-behaviour* and its value on SBCL

Chun Tian (binghe) binghe.lisp at gmail.com
Sat Mar 19 14:51:31 UTC 2011


Hi, ASDF developers

I think asdf:*compile-file-failure-behaviour* should never been set to :error, just :warn is good.

CLHS [1] said about COMPILE-FILE's 2nd and 3rd return values:

"The secondary value, warnings-p, is false if no conditions of type error or warning were detected by the compiler, and true otherwise.

"The tertiary value, failure-p, is false if no conditions of type error or warning (other than style-warning) were detected by the compiler, and true otherwise."

This means, any warnings other than style-warning will cause COMPILE-FILE return T on its third return value.  Than every Lisp file which contains a general (WARN "...") form, when compiling, will cause COMPILE-FILE return T on its third return value, and therefore was marked as "failure" (by ASDF).

In current asdf.lisp, asdf:*compile-file-failure-behaviour* was defined as follow:

(defvar *compile-file-failure-behaviour*
  (or #+sbcl :error #+clisp :ignore :warn)
  "How should ASDF react if it encounters a failure (per the ANSI spec of COMPILE-FILE)
when compiling a file?  Valid values are :error, :warn, and :ignore.
Note that ASDF ALWAYS raises an error if it fails to create an output file when compiling.")

I don't know why SBCL here is special, but this definition caused my project (cl-net-snmp 6.0) failed to be compiled by ASDF "only" on SBCL.  Just try to put following lines in your ASDF based project and try to build it:

(eval-when (:compile-toplevel)
  (warn "xxx"))

you'll find how ludicrous the current setting of asdf:*compile-file-failure-behaviour* are.

Regards,

Chun Tian (binghe)

[1] http://www.lispworks.com/documentation/HyperSpec/Body/f_cmp_fi.htm#compile-file





More information about the asdf-devel mailing list