From: Christophe Rhodes Date: Sun, 19 Oct 2003 18:08:07 +0000 (+0000) Subject: 0.8.4.34: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=3ed86355f579d38d35483c5276331004f27d10cd;p=sbcl.git 0.8.4.34: Make MODULE-PROVIDE-CONTRIB obey the protocol ... hacky solution as per CSR sbcl-devel 2003-10-18 --- diff --git a/src/code/module.lisp b/src/code/module.lisp index 9b2903e..c9f1861 100644 --- a/src/code/module.lisp +++ b/src/code/module.lisp @@ -22,7 +22,7 @@ "This is a list of module names that have been loaded into Lisp so far. It is used by PROVIDE and REQUIRE.") -(defvar sb!ext::*MODULE-PROVIDER-FUNCTIONS* '(module-provide-contrib) +(defvar *module-provider-functions* '(module-provide-contrib) "See function documentation for REQUIRE") @@ -54,7 +54,7 @@ (load ele))) (t (unless (some (lambda (p) (funcall p module-name)) - sb!ext::*module-provider-functions*) + *module-provider-functions*) (error "Don't know how to load ~A" module-name))))) (set-difference *modules* saved-modules))) @@ -63,11 +63,23 @@ (defun module-provide-contrib (name) "Stringify and downcase NAME, then attempt to load the file $SBCL_HOME/name/name" - (let ((filesys-name (string-downcase (string name)))) - (load - (merge-pathnames (make-pathname :directory (list :relative filesys-name) - :name filesys-name :type nil) - (truename (posix-getenv "SBCL_HOME"))))) - t) - - + (let* ((filesys-name (string-downcase (string name))) + (unadorned-path + (merge-pathnames + (make-pathname :directory (list :relative filesys-name) + :name filesys-name) + (truename (posix-getenv "SBCL_HOME")))) + (fasl-path (merge-pathnames + (make-pathname :type *fasl-file-type*) + unadorned-path)) + (lisp-path (merge-pathnames (make-pathname :type "lisp") + unadorned-path))) + ;; KLUDGE: there's a race condition here; the file we probe could + ;; be removed by the time we get round to trying to load it. + ;; Maybe factor out the logic in the LOAD guesser as to which file + ;; was meant, so that we can use it here on open streams instead? + (when (or (probe-file unadorned-path) + (probe-file fasl-path) + (probe-file lisp-path)) + (load unadorned-path) + t))) diff --git a/version.lisp-expr b/version.lisp-expr index a7aab0c..0603f01 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.4.33" +"0.8.4.34"