Punt with-system-library-directories.
authorMatt Birkholz <matt@birchwood-abbey.net>
Tue, 8 Mar 2016 18:38:11 +0000 (11:38 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Tue, 8 Mar 2016 18:38:11 +0000 (11:38 -0700)
This procedure made uninstalled FFIs visible while building or testing
plugins, but it works for one thread only.  A test involving multiple
threads will fail if another thread tries to call out and cannot find
the uninstalled FFI's shim.

src/runtime/pathnm.scm
src/runtime/runtime.pkg

index cc9a3131ffe7d12ec02c77263053cb038f776814..005c237728a3b0468d70ef8e45f6b134760ebf1c 100644 (file)
@@ -640,29 +640,13 @@ these rules:
              (else #f)))
       (%find-library-directory)))
 
-(define (with-system-library-directories directories thunk)
-
-  (define (existing-directory directory)
-    (let ((dirpath (pathname-as-directory (merge-pathnames directory))))
-      (if (file-directory? dirpath)
-         dirpath
-         (error:file-operation dirpath
-                               "find" "directory" "no such directory"
-                               'with-system-library-directories
-                               directories))))
-
-  (parameterize* (list (cons library-directory-path
-                            (append (map existing-directory directories)
-                                    (library-directory-path))))
-    thunk))
-
 (define (%find-library-directory)
   (pathname-simplify
-   (or (find-matching-item (library-directory-path) file-directory?)
+   (or (find-matching-item library-directory-path file-directory?)
        (error "Can't find library directory."))))
 
 (define (%find-library-file pathname)
-  (let loop ((path (library-directory-path)))
+  (let loop ((path library-directory-path))
     (and (pair? path)
         (let ((p (merge-pathnames pathname (car path))))
           (if (file-exists? p)
@@ -736,9 +720,8 @@ these rules:
   (set! param:default-pathname-defaults (make-param:default-pathname-defaults))
   (param:default-pathname-defaults (make-pathname local-host #f #f #f #f #f))
   (set! library-directory-path
-       (make-unsettable-parameter
-        (map pathname-as-directory
-             (vector->list ((ucode-primitive microcode-library-path 0))))))
+       (map pathname-as-directory
+            (vector->list ((ucode-primitive microcode-library-path 0)))))
   unspecific)
 
 (define (initialize-package!)
index 8f0b7313afd9c3c61a2877b48605a7bbdf90027f..ec95f32bbb4df530db05163980b9767dc06fd8d5 100644 (file)
@@ -3212,7 +3212,6 @@ USA.
          pathname?
          system-library-directory-pathname
          system-library-pathname
-         with-system-library-directories
          uri->pathname
          user-homedir-pathname)
   (initialization (initialize-package!)))