Skip to content

Commit

Permalink
Deprecate require-system
Browse files Browse the repository at this point in the history
  • Loading branch information
fare committed Jul 20, 2017
1 parent bcfbac2 commit da7505a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
12 changes: 9 additions & 3 deletions backward-interface.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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))))
9 changes: 1 addition & 8 deletions operate.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit da7505a

Please sign in to comment.