Just have one legacy library: (mit legacy runtime)
authorChris Hanson <org/chris-hanson/cph>
Sun, 20 Oct 2019 23:33:52 +0000 (16:33 -0700)
committerChris Hanson <org/chris-hanson/cph>
Sun, 20 Oct 2019 23:33:52 +0000 (16:33 -0700)
Otherwise it's a pain to figure out where all the exports are, since they aren't
necessarily where you might think.

Also, this eliminates deprecated bindings.

src/runtime/library-standard.scm
src/runtime/make.scm
src/runtime/runtime.pkg

index fa2437d482a0fc34e100d028872b5d61238cff8c..bf2c092dc71cf7d9260ed7b779e14f82f3bb4772 100644 (file)
@@ -977,28 +977,26 @@ USA.
 \f
 ;;;; Legacy packages
 
-(define legacy-libraries)
-
 (define (initialize-legacy-libraries! package-file)
-  (set! legacy-libraries
-       (filter-map (lambda (pd)
-                     (and (let ((name (package-description/name pd)))
-                            (and (pair? name)
-                                 (eq? (car name) 'runtime)))
-                          (create-legacy-library pd)))
-                   (vector->list (package-file/descriptions package-file))))
-  (register-libraries! legacy-libraries host-library-db))
-
-(define (create-legacy-library pd)
-  (make-library (cons* 'mit 'legacy (package-description/name pd))
-               'parsed-imports '()
-               'exports (package-exports pd)
-               'parsed-contents '()
-               'filename #f
-               'environment system-global-environment))
+  (register-library! (make-library '(mit legacy runtime)
+                                  'parsed-imports '()
+                                  'exports (runtime-exports package-file)
+                                  'parsed-contents '()
+                                  'filename #f
+                                  'environment system-global-environment)
+                    host-library-db))
+
+(define (runtime-exports package-file)
+  (append-map package-exports
+             (filter (lambda (pd)
+                       (let ((name (package-description/name pd)))
+                         (and (pair? name)
+                              (eq? (car name) 'runtime))))
+                     (vector->list (package-file/descriptions package-file)))))
 
 (define (package-exports pd)
   (filter-map (lambda (link)
                (and (null? (link-description/package link))
+                    (not (link-description/status link))
                     (make-library-export (link-description/outer-name link))))
              (vector->list (package-description/exports pd))))
\ No newline at end of file
index dce24dbc5cb85c08120c9bfc87fe408cc344b2e1..143a0a54b27becf0581237efd1f93d345b946166 100644 (file)
@@ -585,6 +585,7 @@ USA.
          '(link-description/inner-name
            link-description/outer-name
            link-description/package
+           link-description/status
            package-description/exports
            package-description/name
            package-file/descriptions)))
index e20ba5383058b64c0803253bed21521c0e3e274c..a11c7db772876fc2ff9443fea6c2842678b443bc 100644 (file)
@@ -34,6 +34,7 @@ USA.
   ;; cold load sequence in "make.scm".
   (files "packag")
   (parent ())
+  ;; All these exports must match those in "make.scm".
   (export ()
          *allow-package-redefinition?*
          construct-packages-from-file
@@ -54,9 +55,9 @@ USA.
          package?
          all-packages)
   (export (runtime library standard)
-         link-description/inner-name
          link-description/outer-name
          link-description/package
+         link-description/status
          package-description/exports
          package-description/name
          package-file/descriptions)