From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.bugs Subject: bug#47084: Guile 3.0 - The module-use! 'target' functionality is broken Date: Mon, 3 May 2021 01:26:41 -0300 Message-ID: <20210503012641.38bf8149@aicha> References: <20210312001738.32a82355@aicha> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/IYUQcoFf42bvGZ_KSoQ/t/P"; protocol="application/pgp-signature"; micalg=pgp-sha512 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26117"; mail-complaints-to="usenet@ciao.gmane.io" To: 47084@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon May 03 06:27:12 2021 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldQAp-0006el-VE for guile-bugs@m.gmane-mx.org; Mon, 03 May 2021 06:27:11 +0200 Original-Received: from localhost ([::1]:38138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldQAp-0005Mi-2D for guile-bugs@m.gmane-mx.org; Mon, 03 May 2021 00:27:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldQAg-0005MT-1U for bug-guile@gnu.org; Mon, 03 May 2021 00:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34449) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldQAf-00039l-OF for bug-guile@gnu.org; Mon, 03 May 2021 00:27:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ldQAf-00072X-Jp for bug-guile@gnu.org; Mon, 03 May 2021 00:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Pirotte Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 03 May 2021 04:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47084 X-GNU-PR-Package: guile Original-Received: via spool by 47084-submit@debbugs.gnu.org id=B47084.162001601527055 (code B ref 47084); Mon, 03 May 2021 04:27:01 +0000 Original-Received: (at 47084) by debbugs.gnu.org; 3 May 2021 04:26:55 +0000 Original-Received: from localhost ([127.0.0.1]:45995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldQAY-00072J-R2 for submit@debbugs.gnu.org; Mon, 03 May 2021 00:26:55 -0400 Original-Received: from maximusconfessor.all2all.org ([79.99.200.102]:36556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldQAT-00072D-Ud for 47084@debbugs.gnu.org; Mon, 03 May 2021 00:26:53 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by maximusconfessor.all2all.org (Postfix) with ESMTP id C5E2B1BE0082 for <47084@debbugs.gnu.org>; Mon, 3 May 2021 06:26:48 +0200 (CEST) Original-Received: from maximusconfessor.all2all.org ([127.0.0.1]) by localhost (maximusconfessor.all2all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WfcGueFBdGJl for <47084@debbugs.gnu.org>; Mon, 3 May 2021 06:26:48 +0200 (CEST) Original-Received: from aicha (unknown [179.210.52.91]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id 180041BE007F for <47084@debbugs.gnu.org>; Mon, 3 May 2021 06:26:47 +0200 (CEST) In-Reply-To: <20210312001738.32a82355@aicha> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:10034 Archived-At: --Sig_/IYUQcoFf42bvGZ_KSoQ/t/P Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello, > ... > (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)))) > ... Commit 19f38a38fde7da5fbcf29d0ebc4574e993210110 fixes the bug, many thanks. Now, I have a question related to 'new' warnings though - I say 'new' because there are no warnings in 2.2 - for which I don't see how one can resolve those, unless mute them all by calling default-duplicate-binding-handler and remove warn-override-core and warn from the default list. Here is a example, so one can reproduce and maybe give us some hints: ;;; module (a) starts here (define-module (foo) #:use-module (srfi srfi-1)) (eval-when (expand load eval) (module-use! (module-public-interface (current-module)) (resolve-interface '(srfi srfi-1)))) (for-each display '(1 2 3 4)) (newline) ;;; module (foo) ends here ;;; file bar.scm starts here - not a module, just a file (use-modules (foo)) #;(eval-when (expand load eval) (default-duplicate-binding-handler '(replace last))) (for-each display '(5 6 7 8)) (newline) ;; drop the two above module/file somwhere ;;; now, fire geiser and (add-to-load-path "/your/path") (load "/your/path/bar.scm") ;; you should see that there is no warning 'from (foo)', but two ;; warnings WARNING: (guile-user): imported module (a) overrides core binding `for-each' ;; 'from the bar.scm file (one when it compiles, one when it 'runs' ... ;; if you start a new session, then there should be one warning only ... Now, if we uncomment the eval-when in bar.scm and try again, all is fine But i wish the module-use! interface/internals would be enhanced so that it does the same thing for module-use! then what is done simply using #:use-module... and allow us to keep warn-override-core and warn in the default-duplicate-binding-handler list ... not sure i made myself clear, but trying :) David --Sig_/IYUQcoFf42bvGZ_KSoQ/t/P Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEhCJlRZtBM3furJHe83T9k6MFetcFAmCPe4EACgkQ83T9k6MF etfs+QgAo+HZNZ1t/yJmVVMXp1KY6ZLAzNNcyGZUDW3v5MJ+SlmcP8ZygwZqujBo su0TmB0TbsfmLaPF54tEamDHS4nibH8rBOB0/XZ1gUzFjXBhoeb8jZyPHrJ3Xsts 49kESpU5tOktphVjC5i/sgBkMGgFc95MhTItc1Ff2JNZxWCEvi6SBAr3GDjvUggr +i2SKUKMJzk/IUmlrZB0u/30CBRMTH2fzcOQ0i73b0EmWoLaLW0kUViP/Py9cyjh B10s+tDyFSc1IY+h4FW29dOHw1zthG4xW48UBJyuI571NbzfjJ4QoISl9YodRTvN B3T+A3g3RvUh9gv1yk5jU2krCIPWUw== =zVa7 -----END PGP SIGNATURE----- --Sig_/IYUQcoFf42bvGZ_KSoQ/t/P--