Ignore:
Timestamp:
12/06/12 09:26:37 (8 years ago)
Author:
Mark Evenson
Message:

Backport r14296.

Constrain the logic for when CL:REQUIRE pushes symbols to CL:*MODULES*.

A REQUIRE of ABCL-CONTRIB for an instance of the implementation that
cannot locate the contrib binary artifact as being in the same
directory as the location of the ABCL system jar by
SYS:FIND-SYSTEM-JAR now raises an error.

Fixes #275.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1.x/src/org/armedbear/lisp/require.lisp

    r14170 r14297  
    5757  (unless (member (string module-name) *modules* :test #'string=)
    5858    (let ((saved-modules (copy-list *modules*)))
    59       (cond (pathnames
    60              (unless (listp pathnames) (setf pathnames (list pathnames)))
    61              (dolist (x pathnames)
    62                (load x))
    63              (provide module-name))
    64             (t
    65              (if (some (lambda (p) (funcall p module-name))
     59      (cond               
     60;;; Since these are files packaged with the system we ensure that
     61;;; PROVIDE has been called unless the module has other dependencies
     62;;; that must be satisfied to be loaded, which is currently only the
     63;;; case with 'abcl-contrib'.
     64        (pathnames
     65         (unless (listp pathnames) (setf pathnames (list pathnames)))
     66         (dolist (x pathnames)
     67           (load x))
     68         (unless (string-equal module-name "abcl-contrib")
     69           (provide module-name)))
     70;;; Responsibility for actually calling PROVIDE up to module provider
     71;;; function
     72        (t
     73         (unless (some (lambda (p) (funcall p module-name))
    6674                           (append (list #'module-provide-system)
    67                                  sys::*module-provider-functions*))
    68                  (provide module-name) ;; Shouldn't hurt
    69                  (error "Don't know how to ~S ~A." 'require module-name))))
     75                                   sys::*module-provider-functions*))
     76               (error "Don't know how to ~S ~A." 'require module-name))))
    7077      (set-difference *modules* saved-modules))))
    7178
Note: See TracChangeset for help on using the changeset viewer.