unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* [critical bug] The set! doesn't work in indirect reference
@ 2024-09-18 14:37 Nala Ginrut
  2024-09-18 14:50 ` Thompson, David
  0 siblings, 1 reply; 3+ messages in thread
From: Nala Ginrut @ 2024-09-18 14:37 UTC (permalink / raw)
  To: bug-guile; +Cc: Guile User

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-19  2:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-18 14:37 [critical bug] The set! doesn't work in indirect reference Nala Ginrut
2024-09-18 14:50 ` Thompson, David
2024-09-19  2:34   ` Nala Ginrut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).