From: Chris Hanson Date: Sun, 20 Oct 2019 23:33:52 +0000 (-0700) Subject: Just have one legacy library: (mit legacy runtime) X-Git-Tag: mit-scheme-pucked-10.1.20~11^2~31 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c786cea2a2638a459006140e4ad2976603ef4573;p=mit-scheme.git Just have one legacy library: (mit legacy runtime) 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. --- diff --git a/src/runtime/library-standard.scm b/src/runtime/library-standard.scm index fa2437d48..bf2c092dc 100644 --- a/src/runtime/library-standard.scm +++ b/src/runtime/library-standard.scm @@ -977,28 +977,26 @@ USA. ;;;; 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 diff --git a/src/runtime/make.scm b/src/runtime/make.scm index dce24dbc5..143a0a54b 100644 --- a/src/runtime/make.scm +++ b/src/runtime/make.scm @@ -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))) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index e20ba5383..a11c7db77 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -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)