From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jose A. Ortega Ruiz" Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Fix for `submodules' in (ice-9 session) (closes #30062) Date: Tue, 31 Aug 2010 22:29:05 +0200 Message-ID: <87occi34ry.fsf@newton.homeunix.net> References: <1283257143-24354-1-git-send-email-jao@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1283286575 24674 80.91.229.12 (31 Aug 2010 20:29:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Aug 2010 20:29:35 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Aug 31 22:29:34 2010 Return-path: Envelope-to: guile-devel@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 1OqXSX-0001AW-7J for guile-devel@m.gmane.org; Tue, 31 Aug 2010 22:29:34 +0200 Original-Received: from localhost ([127.0.0.1]:35145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqXSU-00019A-GG for guile-devel@m.gmane.org; Tue, 31 Aug 2010 16:29:30 -0400 Original-Received: from [140.186.70.92] (port=51926 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqXSG-00016g-NA for guile-devel@gnu.org; Tue, 31 Aug 2010 16:29:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqXSB-0001BX-JW for guile-devel@gnu.org; Tue, 31 Aug 2010 16:29:16 -0400 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:45658) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqXSB-0001B8-El for guile-devel@gnu.org; Tue, 31 Aug 2010 16:29:11 -0400 Original-Received: by eyh5 with SMTP id 5so4533858eyh.0 for ; Tue, 31 Aug 2010 13:29:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:from:to:cc :subject:in-reply-to:references:user-agent:x-attribution:x-url:date :message-id:mime-version:content-type; bh=6ga+LYZ9HX9VqWkT60NkrSfQhd1fV/Fx36Ze4jXcGsE=; b=SyPIkuWBxiQ+B9DFNEhdEYyyw6se7PuNaBA4SQSYdeQOV2x+br+Ktiji8wDbdEcU2a 19DT4vWpx9dHAAFz9KG9F2KHwiBdmooJRdfujSctPEM8kpD7vM8T3h8S4XWW+tQMj9mM Se9poMGkjkRO+Dvuw8pv8kGtEFcQsGbjQ28zA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:user-agent :x-attribution:x-url:date:message-id:mime-version:content-type; b=F4hK6L80uvVPM0+97d7D7ISqd78Hgf8hAJ0zYXKEdmhgtjS8w2OWxLhythm2660Kws Mh4GdHHXO1gV3x2iQ7q5JXXwdTYwSjcOdnWXJ4GP1Ji1iDyBkchBkrYbM5ZTT8NIjYJL ED+hh51Np2Z2x0C9GwCuQYBDfecJBLlyfqDE8= Original-Received: by 10.216.35.74 with SMTP id t52mr6904825wea.41.1283286550414; Tue, 31 Aug 2010 13:29:10 -0700 (PDT) Original-Received: from newton.homeunix.net ([83.50.71.238]) by mx.google.com with ESMTPS id o15sm2352217wer.15.2010.08.31.13.29.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 31 Aug 2010 13:29:09 -0700 (PDT) Original-Received: from localhost ([127.0.0.1] helo=newton.homeunix.net ident=jao) by newton.homeunix.net with esmtp (Exim 4.72) (envelope-from ) id 1OqXS5-0006zQ-KH; Tue, 31 Aug 2010 22:29:05 +0200 In-Reply-To: (Andy Wingo's message of "Tue, 31 Aug 2010 09:04:39 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Attribution: jao X-URL: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10823 Archived-At: On Tue, Aug 31 2010, Andy Wingo wrote: > Hi, > > Can you submit a test please, also? I'm not quite sure what you want the test to be: the procedure `submodules' is not exported by `(ice-9 session)', and there's no test suite for the latter, so testing this change properly would mean creating such a test suite, checking all directly affected exported procedures. Those are `apropos-fold-exported' and `apropos-fold-accessible'. Testing them is a bit involved, due to the cycles in the module tree that we have discussed in the past, and that imply that any fold that does not keep track of visited modules and escapes somehow upon detecting a cycle, will enter an infinite loop. Even when escaping, one's not guaranteed to visit all modules. IIRC, those cycles cannot be eliminated for backwards compatibility reasons. IMHO, given the cycles, the apropos-fold* functions are broken (one cannot fold over cyclic structures), and maybe should be fixed instead of applying only this partial fix. A possible solution is making apropos-fold-* work on a real DAG, by prunning cycles during the traversal. IIRC, the modules causing cycles where among those having gensym's as names: if they were catchable by a predicate somehow, and easy solution would be to filter them out in `submodules' -- if for some reason a user needs a gensym module (i don't know what they are or whether they're part of the public module interface), she can access it via `module-submodules'. jao