make each compiler module one file, built once

A module was a body plus a (module ...) wrapper naming its exports, and
the wrapper came in up to three copies: the root's, a test one that
exported everything, and sextest's, each recompiling the same body.

csc -module makes a file a module by itself, with export forms in its
body, so the wrappers are gone. tests/ and tools/sextest/ link what the
root built, finding it on the repository path; the tests see what a
module exports, and the names only they need are exported as such.
This commit is contained in:
2026-10-14 20:51:05 +03:00
parent 540f5c75cd
commit ed369a8ff7
32 changed files with 207 additions and 370 deletions

View File

@@ -4,6 +4,7 @@
(chicken base)
(chicken file)
(chicken load)
(chicken module)
(chicken pathname)
(chicken process-context)
(chicken string)
@@ -14,6 +15,16 @@
types
utils)
(export
get-modules-public-forms
load-persistent-module-paths
check-public-interface
module-dependencies
read-public-interface
;; for the tests
get-module-paths)
(define +persistent-module-paths+ (list))
;;; for guarding against multiple imports (sort of mandatory #pragma