Hi Andy, Andy Wingo <wi...@pobox.com> skribis:
> After some thinking, the base thing to do is just to add a warning port, > and make warnings (non-fatal informative messages) write to that port. > I have done this in the attached patches. Any objections? Ideally I’d preferred to keep current-warning-port in (system base message), but since it’s needed in boot-9, we may have to make it global. Or would the following work?
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 1ddb0ff..e1582a3 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -3767,6 +3767,7 @@ module '(ice-9 q) '(make-q q-length))}." ;; Set filename to #f to prevent reload. (define-module (guile-user) #:autoload (system base compile) (compile compile-file) + #:autoload (system base message) (%current-warning-port) #:filename #f) ;; Remain in the `(guile)' module at compilation-time so that the
Besides, it would be great if ‘*current-warning-prefix*’ were handled consistently, too. All this could certainly be factorized in a Scheme/C function that takes care of using the right port and prefix. WDYT? Thanks, Ludo’.