Funny, but ASDF 1 at some point (commit aa52ad22 1.128 to 1.636) up was defining its own method combination, so users could write their own methods without overwriting ASDF's (but still overwriting each other's).
In practice it was only used for two :around methods for perform, with one being renamed perform-with-restarts in the end. It may also have helped with portability to gcl, that was added at the same time.
-#f
On Thu, Apr 25, 2024, 19:33 Robert Goldman rpgoldman@sift.net wrote:
On 24 Apr 2024, at 3:39, Didier Verna wrote:
François-René ÐVB Rideau écrivait:
What are the methods defined by asdf-flv?
In order to support file local variables, ASDF-FLV does this:
(defmethod asdf:perform :around ((operation asdf:load-op) (file asdf:cl-source-file)) "Establish new dynamic bindings for file-local variables." (progv *file-local-variables* (mapcar #'symbol-value *file-local-variables*) (call-next-method)))
(defmethod asdf:perform :around ((operation asdf:compile-op) (file asdf:cl-source-file)) "Establish new dynamic bindings for file-local variables." (progv *file-local-variables* (mapcar #'symbol-value *file-local-variables*) (call-next-method)))
The problem, of course, is that loading ASDF-FLV will override any existing method with the same signature, and conversely, anything else loaded afterward will override ASDF-FLV.
ASDF-FLV could subclass ASDF:CL-SOURCE-FILE and specialize only on that subclass, but that would defeat its pervasiveness and make it more difficult to have multiple extensions working together. Hence Robert's idea of mixins. My own idea was to have exported operations use a special method combination allowing multiple methods with the same signature.
The one thing that worries me about that is that I don't know how well all the supported lisp implementations handle defining new method combinations.
But otherwise I agree that this would be an appropriate thing to do.