From: Nikita Domnitskii via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" <bug-guile@gnu.org>
To: 70534@debbugs.gnu.org
Subject: bug#70534: eval-string: wrong environment for compilation
Date: Tue, 23 Apr 2024 17:07:02 +0600 [thread overview]
Message-ID: <87le54z6ax.fsf@domnitskii.me> (raw)
Hi!
I'm pretty sure there is a bug in (ice-9 eval-string) implementation.
If #:compile? is true it doesn't pass current module to the
read-and-compile procedure which in my opinion leads to undesired
behavior:
This code snippet doesn't work
--8<---------------cut here---------------start------------->8---
(let ((module (current-module)))
((@ (ice-9 eval-string) eval-string)
"(define-syntax-rule (comment . _) #f)"
#:module module
#:compile? #t)
((@ (ice-9 eval-string) eval-string)
"(comment 1 2 3)"
#:module module
#:compile? #t))
--8<---------------cut here---------------end--------------->8---
While this one does
--8<---------------cut here---------------start------------->8---
(let ((module (current-module)))
((@ (ice-9 eval-string) eval-string)
"(define-syntax-rule (comment . _) #f) (comment 1 2 3)"
#:module module
#:compile? #t))
--8<---------------cut here---------------end--------------->8---
Fix should be pretty easy. Let me know if it's indeed unintended and
I'll send the patch
--
Best Regards,
Nikita Domnitskii
reply other threads:[~2024-04-23 11:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87le54z6ax.fsf@domnitskii.me \
--to=bug-guile@gnu.org \
--cc=70534@debbugs.gnu.org \
--cc=nikita@domnitskii.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).