[asdf-devel] Repe­at f­ile com­pilation

Сергей Катревич linkfly1 at newmail.ru
Thu Oct 6 15:29:29 UTC 2011


O please do not rush. Simplify perform-with-restart is good way. But your last patch:
   - or makes the new version asdf is not backward compatible
   - or provides an error (implicitly, rarely appears)

perform-with-restart is generic function with methods that may defining with system definition in *.asd files (by :perform-with-restart keyword). This feature provided code:

(defparameter +asdf-methods+
  '(perform-with-restarts perform ...)

(defun* %remove-component-inline-methods (component)
  (dolist (name +asdf-methods+)
  ...))

(defun* fine-component-inline-methods (ret rest) ;; !!! rest may be contain keyword :perform-with-restart (it defining "inline method")
  (dolist (name +asdf-methods+)
    ...))

calls:
parse-component-form -> %refresh-component-inline-methods -> %remove-component-inline-methods
                                                                                                     -> fine-component-inline-methods

This means that: we need in the (call-next-method)

Please review my definition perform-with-restarts for compile-op and make analogue (if good code) for load-op:

(defmethod perform-with-restarts ((o compile-op) (c cl-source-file))
  (loop :with state
     :until (eq state :success) :do
     (restart-case
     (progn
       (call-next-method)
       (setf state :success))
       (try-recompiling ()
     :report
     (lambda (s)
       (format s (compatfmt "~@<Try recompiling ~a.~@:>")
           (component-name c)))
     ))))

P.S. I run it and checked - the code solves the problem

Чтв 06 Окт 2011 05:12:39 +0400, Far <fahree at gmail.com> написал:
> I rewrote the perform-with-restarts methods based on what I understand
> they *should* be doing,
> and without any of the state machine complication that I never quite
> got the hang of.
>
> Can you tell me if ASDF works better for you with the attached patch?
> I passes all self-tests for me (on SBCL), but I admit I haven't tried
> hard to trigger the case.
> If it works for you, I'll commit it.
>
> I don't suppose anyone wants to write a test case for that. Sigh.
> So I may have to myself write a file that includes a state machine
> for compile-time and/or load-time failure.
> Yay defvar and eval-when...
>
> —♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
>
>







More information about the asdf-devel mailing list