~ chicken-core (chicken-5) 2fc3e23a2bde7ca34af368af1ca4984629bbff65
commit 2fc3e23a2bde7ca34af368af1ca4984629bbff65
Author: Evan Hanson <evhan@foldling.org>
AuthorDate: Fri Feb 5 19:33:54 2016 +1300
Commit: Evan Hanson <evhan@foldling.org>
CommitDate: Tue Mar 8 22:52:35 2016 +1300
Issue warning when program loads libraries but not the eval unit
Also, add `notice` to the chicken module.
diff --git a/batch-driver.scm b/batch-driver.scm
index 7d885b63..333ef113 100644
--- a/batch-driver.scm
+++ b/batch-driver.scm
@@ -597,6 +597,13 @@
(map (lambda (il) (->string (car il)))
import-libraries) ", ")))
+ (when (null? (lset-intersection/eq? '(eval repl) used-units))
+ (and-let* ((reqs (##sys#hash-table-ref file-requirements 'dynamic)))
+ (notice ; XXX only issued when "-verbose" is used
+ (sprintf "~A has dynamic requirements but doesn't load (chicken eval): ~A"
+ (cond (unit-name "unit") (dynamic "library") (else "program"))
+ (string-intersperse (map ->string reqs) ", ")))))
+
(when (pair? compiler-syntax-statistics)
(with-debugging-output
'S
diff --git a/chicken.import.scm b/chicken.import.scm
index 1290f7ae..08945845 100644
--- a/chicken.import.scm
+++ b/chicken.import.scm
@@ -131,6 +131,7 @@
most-negative-fixnum
most-positive-fixnum
nan?
+ notice
on-exit
open-input-string
open-output-string
Trap