From a4e7b79a5ea74e1ca162cb4b67ef797b6ccee133 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 26 Mar 2001 22:31:47 +0000 Subject: [PATCH] * boot-9.scm (warn-autoload-deprecation): New function. (init-dynamic-module): Use it here to print warning. Only give warning when a module has actually been found. --- ice-9/boot-9.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ice-9/boot-9.scm b/ice-9/boot-9.scm index a1ac4d140..e96defa1f 100644 --- a/ice-9/boot-9.scm +++ b/ice-9/boot-9.scm @@ -1811,12 +1811,23 @@ (append! (convert-c-registered-modules dynobj) registered-modules))) +(define (warn-autoload-deprecation modname) + (display + ";;; Autoloading of compiled code modules is deprecated.\n" + (current-error-port)) + (display + ";;; Write a Scheme file instead that uses `dynamic-link' directly.\n" + (current-error-port)) + (format (current-error-port) + ";;; (You just tried to autoload module ~S.\n" modname)) + (define (init-dynamic-module modname) ;; Register any linked modules which has been registered on the C level (register-modules #f) (or-map (lambda (modinfo) (if (equal? (car modinfo) modname) (begin + (warn-autload-deprecation modname) (set! registered-modules (delq! modinfo registered-modules)) (let ((mod (resolve-module modname #f))) (save-module-excursion