bug#63269: Guile compiler supresses initalization of autoloaded modules

var-vniiaes--- via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
Guile compiler drives out part of initialization for autoloaded
modules (typically,  statements in `side-effects only' form).
Please find below an example. Interpreter produces expected
result;  compiler works fine when `define-public’ form is used
in autoloaded module for `f’ definition. 
 
amaya@t460s:~/tmp/guile-test$ cat main.scm f.scm
(define-module (guile-test main) #:autoload (guile-test f) (f))
(define (main) (f))
(main)
 
(define-module (guile-test f) #:export (f))
(format (current-error-port) "*** module f initialized\n")
(define (f) (format #t "hello from f\n"))
 
amaya@t460s:~/tmp/guile-test$ guile -L .. main.scm
hello from f
 
amaya@t460s:~/tmp/guile-test$ cat main.scm | guile -L ..
GNU Guile 3.0.8
Copyright (C) 1995-2021 Free Software Foundation, Inc. [...]
*** module f initialized
$1 = #<directory (guile-test main) 7f83118763c0>
hello from f
$2 = #t
 
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.