Recompile fasls when incorrect version
Bug #657825 reported by
Robert P. Goldman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ASDF |
Won't Fix
|
Undecided
|
Faré |
Bug Description
Reported by Didier Verna:
For ASDF 1, I had a plug to automatically
recompile outdated fasls (I probably found it on the internet years ago;
don't remember):
(defmethod asdf:perform :around
((o asdf:load-op) (c asdf:cl-
(handler-case (call-next-method o c)
(#+sbcl sb-ext:invalid-fasl
#+cmu ext:invalid-fasl
#+allegro excl::file-
#+lispworks conditions:
#-(or sbcl cmu allegro lispworks) error
()
(asdf:perform (make-instance 'asdf:compile-op) c)
(
To post a comment you must log in.
In its present form it seems a little yucky. Ideally, it seems to me,
the OPERATION-DONE-P test for the COMPILE-OP should fail on an
incompatible fasl. That's a lot cleaner than the solution that involves
a direct outside call to PERFORM, which really breaches the API. This
leads to a potential for error. For example, I'm pretty sure that the
the ASDF:COMPILE-OP instance here is not built correctly --- it should
be inheriting its initargs from the top-level operation instance, which
is the way things are normally done in ASDF.
That said, I do not know how to probe a file to test whether it has a
compatible FASL type, aside from trying to load it. Anyone know if this
is possible?