From: David Pirotte <david@altosw.be>
To: 47084@debbugs.gnu.org
Subject: bug#47084: Guile 3.0 - The module-use! 'target' functionality is broken
Date: Fri, 12 Mar 2021 00:17:38 -0300 [thread overview]
Message-ID: <20210312001738.32a82355@aicha> (raw)
[-- Attachment #1: Type: text/plain, Size: 2945 bytes --]
Hello,
Guile 3.0
The module-use! 'target' functionality is broken
The code of module-use! itself didn't change, and call(s) to the
procedure work(s) fine, but the functionality it is supposed to
provide is broken.
To reproduce, save the following minimalist module somewhere:
;; start here
(define-module (a)
#:use-module (srfi srfi-1))
(eval-when (expand load eval)
(module-use! (module-public-interface (current-module))
(resolve-interface '(srfi srfi-1))))
;; end here
;; then, fire a 3.0 repl:
(add-to-load-path "/your/path")
,use (a)
map
[ below, my attempts using Guile 3.0.4.3-e076a5, then Guile
[ 2.2.7.2-a5875-dirty to compare.
Fwiw:
(a) G-Golf extensively relies on the module-use! functionality
'in general', and in particular, on its 'dynamic' implementation - that
is, the public interface of a module that has been 'module-used'
may evolve in time (at the 'essence' of any GI dynamic binding);
(b) just like for the minimalist module (a) above, but it will
do so 'dynamically', G-Golf needs that the public interface of a
module that has been 'module-used' may re-export-and-replace a guile
core procedure (generally promoted as a generic function, with the core
proc as its default method).
Thanks,
David
GNU Guile 3.0.4.3-e076a5
...
scheme@(guile-user)> (add-to-load-path "/home/david/alto/projects/g-golf/3.0")
scheme@(guile-user)> ,use (a)
;;; compiling /home/david/alto/projects/g-golf/3.0/a.scm
;;; compiled /home/david/.cache/guile/ccache/3.0-LE-8-4.3/usr/alto/projects/g-golf/3.0/a.scm.go
scheme@(guile-user)> map
WARNING: (guile-user): imported module (a) overrides core binding `map'
WARNING: (guile-user): `map' imported from both (guile) and (a)
WARNING: (guile-user): imported module (a) overrides core binding `map'
WARNING: (guile-user): `map' imported from both (guile) and (a)
;;; <unknown-location>: warning: possibly unbound variable `map'
WARNING: (guile-user): imported module (a) overrides core binding `map'
WARNING: (guile-user): `map' imported from both (guile) and (a)
WARNING: (guile-user): imported module (a) overrides core binding `map'
WARNING: (guile-user): `map' imported from both (guile) and (a)
ice-9/boot-9.scm:1670:16: In procedure raise-exception:
Unbound variable: map
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>
GNU Guile 2.2.7.2-a5875-dirty
...
scheme@(guile-user)> (add-to-load-path "/home/david/alto/projects/g-golf/3.0")
scheme@(guile-user)> ,use (a)
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /home/david/alto/projects/g-golf/3.0/a.scm
;;; compiled /home/david/.cache/guile/ccache/2.2-LE-8-3.A/usr/alto/projects/g-golf/3.0/a.scm.go
scheme@(guile-user)> map
$2 = #<procedure map (f l) | (f l1 l2) | (f l1 . rest)>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2021-03-12 3:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-12 3:17 David Pirotte [this message]
2021-05-03 4:26 ` bug#47084: Guile 3.0 - The module-use! 'target' functionality is broken David Pirotte
2021-05-04 4:37 ` David Pirotte
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=20210312001738.32a82355@aicha \
--to=david@altosw.be \
--cc=47084@debbugs.gnu.org \
/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).