On 5 February 2011 17:14, Juan Jose Garcia-Ripoll
<[email protected]> wrote:
>> Please understand that all this is about not *hardcoding* in ASDF what the
>> compiler should or should not do. All you are suggesting is about reader
>> conditionalization (that means one ASDF file per compiler), hardcoding
>> behavior based on externally defined flags (which may or may not exist at
>> all in older or later releases), and other things that overcomplicate the
>> problem.
>
Where is the behavior to be coded? Surely it must be coded somewhere.
Is it unreasonable to upgrade ASDF when new code is required, and to change
few boolean controls to select which branch of the code applies?

> Argghh this does not work at all. I did not realize that ASDF's compilation
> now uses a temporary file name. That is really unfortunate because it means
> we can not really wrap inside compile-file* and also not around
> compile-file*, and we have to go back to the level of PERFORM.
>
Or perhaps we could factor ASDF to do renaming for all client methods
in a more transparent way - problem being it would require
invalidating existing extensions.

> Attached is a diff where this customization is thus introduced at the only
> place where it makes sense, and it is done using a single special variable
> that can be dynamically changed. Seems to work with quicklisp
>
Here's a counter-proposal.

[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
To take five and return four, isn't giving — it's stealing. To take five by
force, and return four under condition of obedience, is worse than stealing
— it's enslaving. When most of these four are "returned" in the form of
monopolized "services", charged a hefty price despite their inferior
quality, and mixed with a large dose of propaganda — it's Government.
diff --git a/asdf-ecl.lisp b/asdf-ecl.lisp
index 3cf8575..a0b1ab6 100644
--- a/asdf-ecl.lisp
+++ b/asdf-ecl.lisp
@@ -12,7 +12,22 @@
 #+xcvb (module (:depends-on ("asdf")))
 
 (in-package :asdf)
-(require :cmp)
+
+(defparameter *compile-file-must-also-build-fasl-p* t)
+
+#-ecl-bytecmp
+(defmethod compile-file* :around (input-file &rest keys &key output-file &allow-other-keys)
+  (declare (ignore output-file))
+  (if *compile-file-must-also-build-fasl-p*
+      (multiple-value-bind (object-file flags1 flags2)
+          (apply #'call-next-method input-file :system-p t keys)
+        (values (and object-file
+                     (c::build-fasl (compile-file-pathname object-file :type :fasl)
+                                    :lisp-files (list object-file))
+                     object-file)
+                flags1
+                flags2))
+      (call-next-method)))
 
 ;;;
 ;;; COMPILE-OP / LOAD-OP
@@ -96,11 +111,11 @@
          (*force-load-p* t)
          (tree (traverse (make-instance 'load-op) system)))
     (append
-     (loop for (op . component) in tree
-        when (and (typep op 'load-op)
+     (loop :for (op . component) :in tree
+       :when (and (typep op 'load-op)
                   (typep component filter-type)
                   (or (not filter-system) (eq (component-system component) filter-system)))
-        collect (progn
+       :collect (progn
                   (when (eq component system) (setf include-self nil))
                   (cons operation component)))
      (and include-self (list (cons operation system))))))
@@ -414,7 +429,6 @@
 (export '(make-build load-fasl-op prebuilt-system))
 (push '("fasb" . si::load-binary) si::*load-hooks*)
 
-(require 'cmp)
 (defvar *require-asdf-operator* 'load-op)
 
 (defun module-provide-asdf (name)
@@ -430,9 +444,9 @@
                                        :source-file nil)))
 
 (setf si::*module-provider-functions*
-      (loop for f in si::*module-provider-functions*
-         unless (eq f 'module-provide-asdf)
-         collect #'(lambda (name)
+      (loop :for f :in si::*module-provider-functions*
+        :unless (eq f 'module-provide-asdf)
+        :collect #'(lambda (name)
                      (let ((l (multiple-value-list (funcall f name))))
                        (and (first l) (register-pre-built-system name))
                        (values-list l)))))
@@ -440,4 +454,4 @@
 (pushnew 'module-provide-asdf ext:*module-provider-functions*)
 (pushnew (translate-logical-pathname "SYS:") *central-registry*)
 
-(provide 'asdf)
+(provide :asdf)
diff --git a/asdf.lisp b/asdf.lisp
index c6ad0bc..45eae29 100644
--- a/asdf.lisp
+++ b/asdf.lisp
@@ -3217,18 +3217,6 @@ effectively disabling the output translation facility."
          (setf output-truename nil)))
       (values output-truename warnings-p failure-p))))
 
-#+(and ecl (not ecl-bytecmp))
-(defmethod compile-file* :around (input-file &rest keys &key output-file &allow-other-keys)
-  (declare (ignore output-file))
-  (multiple-value-bind (object-file flags1 flags2)
-      (apply #'call-next-method input-file :system-p t keys)
-    (values (and object-file
-                 (c::build-fasl (compile-file-pathname object-file :type :fasl)
-                                :lisp-files (list object-file))
-                           object-file)
-            flags1
-            flags2)))
-
 #+abcl
 (defun* translate-jar-pathname (source wildcard)
   (declare (ignore wildcard))
_______________________________________________
asdf-devel mailing list
[email protected]
http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel

Reply via email to