From 63136fdc270c1b59fd9ca37c1c4d70982a493311 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tunes@google.com> Date: Sun, 23 Mar 2014 22:14:25 -0400 Subject: [PATCH] Rename function BUILD to MAKE, as seems to be the consensus on asdf-devel. Also, override prepare-op on systems to use *load-system-operation*, so that all the efforts of load-bundle-op aren't negated by the first-come compilation. --- action.lisp | 4 +--- interface.lisp | 2 +- operate.lisp | 9 ++++++--- test/test-defsystem-depends-on.script | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/action.lisp b/action.lisp index 76106f81..4600edd8 100644 --- a/action.lisp +++ b/action.lisp @@ -180,9 +180,7 @@ depends on each of (S . D) where D is a declared dependency of C. E.g. in order for a COMPONENT to be prepared for loading or compiling with PREPARE-OP, each of its declared dependencies must first be loaded as by LOAD-OP.")) (defun sideway-operation-depends-on (o c) - `((,(or (sideway-operation o) o) - ,@(loop :for dep :in (component-sideway-dependencies c) - :collect (resolve-dependency-spec c dep))))) + `((,(or (sideway-operation o) o) ,@(component-sideway-dependencies c)))) (defmethod component-depends-on ((o sideway-operation) (c component)) `(,@(sideway-operation-depends-on o c) ,@(call-next-method))) diff --git a/interface.lisp b/interface.lisp index 2bc43bbd..787bbe17 100644 --- a/interface.lisp +++ b/interface.lisp @@ -25,7 +25,7 @@ #:operation #:make-operation #:find-operation #:upward-operation #:downward-operation #:sideway-operation #:selfward-operation #:non-propagating-operation - #:build-op #:build + #:build-op #:make #:load-op #:prepare-op #:compile-op #:prepare-source-op #:load-source-op #:test-op #:feature #:version #:version-satisfies #:upgrade-asdf diff --git a/operate.lisp b/operate.lisp index 8d306d7d..1df546ae 100644 --- a/operate.lisp +++ b/operate.lisp @@ -9,7 +9,7 @@ (:export #:operate #:oos #:*systems-being-operated* - #:build-op #:build + #:build-op #:make #:load-system #:load-systems #:load-systems* #:compile-system #:test-system #:require-system #:*load-system-operation* #:module-provide-asdf @@ -110,6 +110,9 @@ or ASDF:LOAD-SOURCE-OP if your fasl loading is somehow broken. The default operation may change in the future if we implement a component-directed strategy for how to load or compile systems.") + (defmethod perform ((o prepare-op) (s system)) + `((,*load-system-operation* ,@(component-sideway-dependencies s)))) + (defclass build-op (non-propagating-operation) () (:documentation "Since ASDF3, BUILD-OP is the recommended 'master' operation, to operate by default on a system or component, via the function BUILD. @@ -121,8 +124,8 @@ that will load the system in the current image, and its typically LOAD-OP.")) (defmethod component-depends-on ((o build-op) (c component)) `((,(or (component-build-operation c) *load-system-operation*) ,c))) - (defun build (system &rest keys) - "The recommended way to interact with ASDF3.1 is via (ASDF:BUILD :FOO). + (defun make (system &rest keys) + "The recommended way to interact with ASDF3.1 is via (ASDF:MAKE :FOO). It will build system FOO using the operation BUILD-OP, the meaning of which is configurable by the system, and defaults to *LOAD-SYSTEM-OPERATION*, usually LOAD-OP, diff --git a/test/test-defsystem-depends-on.script b/test/test-defsystem-depends-on.script index 9a60ad91..9c2099cd 100644 --- a/test/test-defsystem-depends-on.script +++ b/test/test-defsystem-depends-on.script @@ -18,7 +18,7 @@ (assert-equal 0 l-operation:*x*) -(build :test-defsystem-depends-on-2) +(make :test-defsystem-depends-on-2) (assert-equal 2 l-operation:*x*) ;; perform called twice, on file and on system. @@ -27,4 +27,4 @@ :build-operation "does-not-exist" :components ((:file "file3"))) -(signals asdf::formatted-system-definition-error (build :test-defsystem-depends-on-3)) +(signals asdf::formatted-system-definition-error (make :test-defsystem-depends-on-3)) -- GitLab