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

Skip find-system in alread-loaded-systems.

This helps with e.g. not needlessly triggering find-system hooks,
or invalidating the loadedness status because there was a system update.
https://github.com/quicklisp/quicklisp-client/pull/122#issuecomment-159744105
parent 65174989
......@@ -9,7 +9,8 @@
#:remove-entry-from-registry #:coerce-entry-to-directory
#:coerce-name #:primary-system-name #:coerce-filename
#:find-system #:locate-system #:load-asd
#:system-registered-p #:register-system #:registered-systems #:clear-system #:map-systems
#:system-registered-p #:register-system #:registered-systems* #:registered-systems
#:clear-system #:map-systems
#:missing-component #:missing-requires #:missing-parent
#:formatted-system-definition-error #:format-control #:format-arguments #:sysdef-error
#:load-system-definition-error #:error-name #:error-pathname #:error-condition
......@@ -74,9 +75,12 @@ of which is a system object.")
(defun system-registered-p (name)
(gethash (coerce-name name) *defined-systems*))
(defun registered-systems ()
(defun registered-systems* ()
(loop :for registered :being :the :hash-values :of *defined-systems*
:collect (coerce-name (cdr registered))))
:collect (cdr registered)))
(defun registered-systems ()
(mapcar 'coerce-name (registered-systems*)))
(defun register-system (system)
(check-type system system)
......
......@@ -170,7 +170,7 @@ to load it in current image."
(defun already-loaded-systems ()
"return a list of the names of the systems that have been successfully loaded so far"
(remove-if-not 'component-loaded-p (registered-systems)))
(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 skip any update to the
......
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