From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jose Antonio Ortega Ruiz Newsgroups: gmane.lisp.guile.bugs Subject: [bug #30116] (guile) introduces a cycle in the submodules subtree Date: Fri, 11 Jun 2010 15:31:15 +0000 Message-ID: <20100611-153114.sv424.62219@savannah.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=UTF-8 X-Trace: dough.gmane.org 1276270293 8910 80.91.229.12 (11 Jun 2010 15:31:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Jun 2010 15:31:33 +0000 (UTC) To: Jose Antonio Ortega Ruiz , bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Jun 11 17:31:32 2010 connect(): No such file or directory Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ON6Ce-0001L4-Mv for guile-bugs@m.gmane.org; Fri, 11 Jun 2010 17:31:29 +0200 Original-Received: from localhost ([127.0.0.1]:43351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ON6Ce-0006su-4j for guile-bugs@m.gmane.org; Fri, 11 Jun 2010 11:31:28 -0400 Original-Received: from [140.186.70.92] (port=48741 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ON6CY-0006sT-32 for bug-guile@gnu.org; Fri, 11 Jun 2010 11:31:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ON6CW-0000Fp-Ed for bug-guile@gnu.org; Fri, 11 Jun 2010 11:31:21 -0400 Original-Received: from colonialone.fsf.org ([140.186.70.51]:56675 helo=internal.in.savannah.gnu.org) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ON6CT-0000Es-Km; Fri, 11 Jun 2010 11:31:17 -0400 Original-Received: from [10.1.0.103] (helo=frontend.in.savannah.gnu.org) by internal.in.savannah.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ON6CT-0000UF-5i; Fri, 11 Jun 2010 15:31:17 +0000 Original-Received: from www-data by frontend.in.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1ON6CR-0006HW-Bm; Fri, 11 Jun 2010 15:31:16 +0000 X-Savane-Server: savannah.gnu.org:443 [10.1.0.103] X-Savane-Project: guile X-Savane-Tracker: bugs X-Savane-Item-ID: 30116 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100501 Conkeror/0.9.2 (Debian-0.9.2+git100611-~nightlybuild1276207621) X-Apparently-From: 88.6.161.234 (Savane authenticated user jao) Original-References: In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:4650 Archived-At: URL: Summary: (guile) introduces a cycle in the submodules subtree Project: Guile Submitted by: jao Submitted on: Fri 11 Jun 2010 03:31:13 PM GMT Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: Define the auxiliary procedure: (define (submodules m) (hash-map->list list (module-submodules m))) which just extracts a list of submodules of `m'. Now apply it to the '(guile) module: (define gm (resolve-module '(guile) #f)) (submodules m) this evaluates to a duplicate submodule with different names: ((%app #) (app #)) Asking for the submodules of either one of those gives: (define (submodules* m) (cdr (submodules m))) (submodules* (car (submodules* m)) => (#) and getting the submodules of this last one, one obtains the list of top level modules, which again includes `gm'. That means that the module tree isn't actually a tree, but a DAG, which sounds weird to me (and will most probably provoke infinite loops in module folders). Also, the duplicated submodule of '(guile) seems an implementation detail accidentally leaked (hiding it would break the cycle). _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/