Raymond Toy pushed to branch issue-113-prefer-cmucl-modules at cmucl / cmucl
Commits: af8841b4 by Raymond Toy at 2021-09-20T11:49:07-07:00 Only load ASDF if the Cmucl providers failed
If the cmucl providers succeed, don't load asdf so we don't unnecessarily pollute the image if asdf isn't needed. If the cmucl providers fail, then load asdf so we can use asdf to load the other contribs or other asdf packages that might be available.
- - - - -
1 changed file:
- src/code/module.lisp
Changes:
===================================== src/code/module.lisp ===================================== @@ -107,11 +107,6 @@ "contrib-games-feebs", "contrib-hist", "contrib-psgraph", "contrib-ops", "contrib-embedded-c", "contrib-sprof", and "contrib-packed-sse2". " - ;; First, load asdf if it's not already loaded. This is needed to - ;; load easily the contribs that use asdf. There are no contribs - ;; that use defsystem, so we won't autoload defsystem. - (unless (featurep :asdf) - (load "modules:asdf/asdf")) (let ((saved-modules (copy-list *modules*)) (module-name (module-name-string module-name))) (unless (member module-name *modules* :test #'string=) @@ -124,8 +119,14 @@ ;; any asdf version, if asdf is loaded. (or (some (lambda (p) (funcall p module-name)) *cmucl-provider-functions*) - (some (lambda (p) (funcall p module-name)) - *module-provider-functions*) + (progn + ;; Load asdf if it's not already loaded. This is needed to + ;; load easily the contribs that use asdf. There are no contribs + ;; that use defsystem, so we won't autoload defsystem. + (unless (featurep :asdf) + (load "modules:asdf/asdf")) + (some (lambda (p) (funcall p module-name)) + *module-provider-functions*)) (error (intl:gettext "Don't know how to load ~A") module-name))))) (set-difference *modules* saved-modules)))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/af8841b424a38d43fe5debc9...