Commit ce38be76 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Remove *load-system-operation*

See discussion on https://bugs.launchpad.net/asdf/+bug/1649198
parent ba4b048a
...@@ -100,7 +100,7 @@ itself.")) ...@@ -100,7 +100,7 @@ itself."))
;; Using load-op as the goal operation and basic-compile-op as the keep-operation works ;; Using load-op as the goal operation and basic-compile-op as the keep-operation works
;; for our needs of gathering all the files we want to include in a bundle. ;; for our needs of gathering all the files we want to include in a bundle.
;; Note that we use basic-compile-op rather than compile-op so it will still work on ;; Note that we use basic-compile-op rather than compile-op so it will still work on
;; systems when *load-system-operation* is load-bundle-op. ;; systems that would somehow load dependencies with load-bundle-op.
(required-components (required-components
s :other-systems mono :component-type component-type :keep-component keep-component s :other-systems mono :component-type component-type :keep-component keep-component
:goal-operation 'load-op :keep-operation 'basic-compile-op))) :goal-operation 'load-op :keep-operation 'basic-compile-op)))
...@@ -433,7 +433,7 @@ or of opaque libraries shipped along the source code.")) ...@@ -433,7 +433,7 @@ or of opaque libraries shipped along the source code."))
(dependencies (dependencies
(if (operation-monolithic-p o) (if (operation-monolithic-p o)
;; We want only dependencies, and we use basic-load-op rather than load-op so that ;; We want only dependencies, and we use basic-load-op rather than load-op so that
;; this will keep working on systems when *load-system-operation* is load-bundle-op ;; this will keep working on systems that load dependencies with load-bundle-op
(remove-if-not 'builtin-system-p (remove-if-not 'builtin-system-p
(required-components s :component-type 'system (required-components s :component-type 'system
:keep-operation 'basic-load-op)) :keep-operation 'basic-load-op))
...@@ -504,11 +504,6 @@ which is probably not what you want; you probably need to tweak your output tran ...@@ -504,11 +504,6 @@ which is probably not what you want; you probably need to tweak your output tran
#+(or clasp ecl mkcl) #+(or clasp ecl mkcl)
(with-upgradability () (with-upgradability ()
#+ecl ;; doesn't work on clasp or mkcl (yet?).
(unless (use-ecl-byte-compiler-p)
(setf *load-system-operation* 'load-bundle-op))
(defun system-module-pathname (module) (defun system-module-pathname (module)
(let ((name (coerce-name module))) (let ((name (coerce-name module)))
(some (some
......
...@@ -105,7 +105,6 @@ ...@@ -105,7 +105,6 @@
#:*compile-file-warnings-behaviour* #:*compile-file-warnings-behaviour*
#:*compile-file-failure-behaviour* #:*compile-file-failure-behaviour*
#:*resolve-symlinks* #:*resolve-symlinks*
#:*load-system-operation*
#:*asdf-verbose* ;; unused. For backward-compatibility only. #:*asdf-verbose* ;; unused. For backward-compatibility only.
#:*verbose-out* #:*verbose-out*
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#:build-op #:make #:build-op #:make
#:load-system #:load-systems #:load-systems* #:load-system #:load-systems #:load-systems*
#:compile-system #:test-system #:require-system #:compile-system #:test-system #:require-system
#:*load-system-operation* #:module-provide-asdf #:module-provide-asdf
#:component-loaded-p #:already-loaded-systems)) #:component-loaded-p #:already-loaded-systems))
(in-package :asdf/operate) (in-package :asdf/operate)
...@@ -103,45 +103,34 @@ But do NOT depend on it, for this is deprecated behavior.")) ...@@ -103,45 +103,34 @@ But do NOT depend on it, for this is deprecated behavior."))
;;;; Common operations ;;;; Common operations
(with-upgradability () (when-upgrading ()
(defvar *load-system-operation* 'load-op
"Operation used by ASDF:LOAD-SYSTEM. By default, ASDF:LOAD-OP.
You may override it with e.g. ASDF:LOAD-BUNDLE-OP from asdf/bundle
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.")
;; In prepare-op for a system, propagate *load-system-operation* rather than load-op
(defmethod component-depends-on ((o prepare-op) (s system)) (defmethod component-depends-on ((o prepare-op) (s system))
(loop :for (do . dc) :in (call-next-method) (call-next-method)))
:collect (cons (if (eq do 'load-op) *load-system-operation* do) dc))) (with-upgradability ()
(defclass build-op (non-propagating-operation) () (defclass build-op (non-propagating-operation) ()
(:documentation "Since ASDF3, BUILD-OP is the recommended 'master' operation, (:documentation "Since ASDF3, BUILD-OP is the recommended 'master' operation,
to operate by default on a system or component, via the function BUILD. to operate by default on a system or component, via the function BUILD.
Its meaning is configurable via the :BUILD-OPERATION option of a component. Its meaning is configurable via the :BUILD-OPERATION option of a component.
which typically specifies the name of a specific operation to which to delegate the build, which typically specifies the name of a specific operation to which to delegate the build,
as a symbol or as a string later read as a symbol (after loading the defsystem-depends-on); as a symbol or as a string later read as a symbol (after loading the defsystem-depends-on);
if NIL is specified (the default), BUILD-OP falls back to the *LOAD-SYSTEM-OPERATION* if NIL is specified (the default), BUILD-OP falls back to LOAD-OP,
that will load the system in the current image, and its typically LOAD-OP.")) that will load the system in the current image."))
(defmethod component-depends-on ((o build-op) (c component)) (defmethod component-depends-on ((o build-op) (c component))
`((,(or (component-build-operation c) *load-system-operation*) ,c) `((,(or (component-build-operation c) 'load-op) ,c)
,@(call-next-method))) ,@(call-next-method)))
(defun make (system &rest keys) (defun make (system &rest keys)
"The recommended way to interact with ASDF3.1 is via (ASDF:MAKE :FOO). "The recommended way to interact with ASDF3.1 is via (ASDF:MAKE :FOO).
It will build system FOO using the operation BUILD-OP, It will build system FOO using the operation BUILD-OP,
the meaning of which is configurable by the system, and the meaning of which is configurable by the system, and
defaults to *LOAD-SYSTEM-OPERATION*, usually LOAD-OP, defaults to LOAD-OP, to load it in current image."
to load it in current image."
(apply 'operate 'build-op system keys) (apply 'operate 'build-op system keys)
t) t)
(defun load-system (system &rest keys &key force force-not verbose version &allow-other-keys) (defun load-system (system &rest keys &key force force-not verbose version &allow-other-keys)
"Shorthand for `(operate 'asdf:load-op system)`. See OPERATE for details." "Shorthand for `(operate 'asdf:load-op system)`. See OPERATE for details."
(declare (ignore force force-not verbose version)) (declare (ignore force force-not verbose version))
(apply 'operate *load-system-operation* system keys) (apply 'operate 'load-op system keys)
t) t)
(defun load-systems* (systems &rest keys) (defun load-systems* (systems &rest keys)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment