From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: bizarre byte-compile issue, possibly due to EIEIO Date: Sat, 02 Apr 2011 23:32:45 +0200 Message-ID: <87lizs9w5e.fsf@randomsample.de> References: <87hbahww99.fsf@lifelogs.com> <8762qxo4l3.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1301780044 21241 80.91.229.12 (2 Apr 2011 21:34:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 2 Apr 2011 21:34:04 +0000 (UTC) Cc: ding@gnus.org, emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 02 23:34:00 2011 Return-path: Envelope-to: ged-emacs-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 1Q68SF-0001zP-Tt for ged-emacs-devel@m.gmane.org; Sat, 02 Apr 2011 23:34:00 +0200 Original-Received: from localhost ([127.0.0.1]:46590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q68SF-0004Ot-CG for ged-emacs-devel@m.gmane.org; Sat, 02 Apr 2011 17:33:59 -0400 Original-Received: from [140.186.70.92] (port=55957 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q68S4-00044b-QB for emacs-devel@gnu.org; Sat, 02 Apr 2011 17:33:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q68Rz-00062J-Tv for emacs-devel@gnu.org; Sat, 02 Apr 2011 17:33:48 -0400 Original-Received: from v3-1008.vxen.de ([79.140.41.8]:42669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q68Rz-00061A-Eo for emacs-devel@gnu.org; Sat, 02 Apr 2011 17:33:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=aJWgb3/unM0bPimuwqs5oSr4tgwRcIFHSL8jDxArR8I=; b=QiIIRZTVD1WV5PyRvykUX1R6qdU/lz+ckpUHy9wyi8usYEWcPy6k5uMgjMvfPH5JswDTYC7t4v54bo1eHnaAAqQmylhqACMr0EHOVZNPO4yx1jlFCg8BMZ6FcD5hE4wF; Original-Received: from dslc-082-082-182-187.pools.arcor-ip.net ([82.82.182.187] helo=spaten) by v3-1008.vxen.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Q68Rp-00072I-VH; Sat, 02 Apr 2011 23:33:34 +0200 In-Reply-To: <8762qxo4l3.fsf@lifelogs.com> (Ted Zlatanov's message of "Fri, 01 Apr 2011 19:54:32 -0500") User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) Mail-Followup-To: Ted Zlatanov , emacs-devel@gnu.org, ding@gnus.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 79.140.41.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:138074 gmane.emacs.gnus.general:78316 Archived-At: Ted Zlatanov writes: > On Fri, 01 Apr 2011 15:29:38 -0500 Ted Zlatanov wrote: > > TZ> In other words, the registry.elc file is breaking the tests. I can't > TZ> figure out what's wrong, but it seems EIEIO-related. If I try to > TZ> edebug, that evaluates the problematic methods (e.g. `registry-lookup') > TZ> and then they don't exhibit the problem. > > TZ> Using "(eval-when-compile (require 'registry))" instead of > TZ> "(require 'registry)" doesn't help. All the registry.el ERT tests pass. > > (CC to ding mailing list; see prior messages on emacs-devel for context) > > I've been able to work around it with: > > (let ((load-suffixes '(".el"))) > (require 'registry)) [...] > So I hope someone can help me out :) I can't really explain anything, but maybe I can at least shift the blame. ;-) If I rewrite your registry-lookup function to use 'mapcar' instead of 'loop', the tests work as expected: (defmethod registry-lookup ((db registry-db) keys) "Search for KEYS in the registry-db THIS. Returns a alist of the key followed by the entry in a list, not a cons cell." (let ((data (oref db :data))) (delq nil (mapcar (lambda (k) (when (gethash k data) (list k (gethash k data)))) keys)))) -David