Skip to content
Snippets Groups Projects
Commit 63136fdc authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

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.
parent a7f393c4
No related branches found
No related tags found
No related merge requests found
......@@ -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)))
......
......@@ -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
......
......@@ -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,
......
......@@ -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))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment