Commit d3ce9760 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Deprecate require-system

parent d9c15849
......@@ -16,7 +16,7 @@
#:operation-on-failure #:operation-on-warnings #:on-failure #:on-warnings
#:component-property
#:run-shell-command
#:system-definition-pathname #:system-registered-p
#:system-definition-pathname #:system-registered-p #:require-system
#:explain))
(in-package :asdf/backward-interface)
......@@ -218,5 +218,11 @@ The value returned if true is a pair of a timestamp and a system object."
(if-let (system (registered-system name))
(cons (if-let (primary-system (registered-system (primary-system-name name)))
(component-operation-time 'define-op primary-system))
system))))
system)))
(defun require-system (system &rest keys &key &allow-other-keys)
"Ensure the specified SYSTEM is loaded, passing the KEYS to OPERATE, but do not update the
system or its dependencies if it has already been loaded."
(declare (ignore keys))
(unless (component-loaded-p system)
(load-system system))))
......@@ -183,14 +183,7 @@ Note that this returns true even if the component is not up to date."
(defun already-loaded-systems ()
"return a list of the names of the systems that have been successfully loaded so far"
(mapcar 'coerce-name (remove-if-not 'component-loaded-p (registered-systems*))))
(defun require-system (system &rest keys &key &allow-other-keys)
"Ensure the specified SYSTEM is loaded, passing the KEYS to OPERATE, but do not update the
system or its dependencies if it has already been loaded."
(declare (ignore keys))
(unless (component-loaded-p system)
(load-system system))))
(mapcar 'coerce-name (remove-if-not 'component-loaded-p (registered-systems*)))))
;;;; Define the class REQUIRE-SYSTEM, to be hooked into CL:REQUIRE when possible,
......
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