[critical bug] The set! doesn't work in indirect reference

Nala Ginrut <[email protected]>
Newsgroups gmane.lisp.guile.user,gmane.lisp.guile.bugs
Message-ID <CAPjoZocrB8tFJ4UEqtm-rjhDvkv2pM=oZs6zDYxLgBKp_mMrRA@mail.gmail.com>
Hi folks!
Recently I was bothered by a strange bug when debugging Artanis, here's how
to reproduce.
You need three files, say aaa.scm, bbb.scm, and entry

---------------------aaa.scm----------------
(define-module (aaa)
 #:export (global))

(define global #f)
----------------------aaa.scm end------------

------------------bbb.scm----------------
(define-module (bbb)
 #:use-module (aaa)
 #:export (fun))

(define (fun)
 (pk 'before global)
 (set! global 123)
 (pk 'after global))
-------------------bbb.scm end-------------



------------------entry-------------
(import (bbb))

(fun)
-----------------entry end-------------


Put all files in the same directory, and run:
----------------cut----------------
guile -L . entry
----------------end---------------


The result is:
;;; (before #f)
;;; (after #f)

The expected result should be:
;; (before #f)
;; (after 123)

------------------------------------------

This was tested in 3.0.9 and 3.0.10.

I also CC  guile-user list, in case anyone was troubled by strange bugs,
this may be a hint.


Best regards.
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.