From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78391 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: no gnus registry new dependency on ert? Date: Wed, 06 Apr 2011 17:03:50 +0200 Message-ID: References: <8762qs3swu.fsf@ericabrahamsen.net> <87ipur8zny.fsf@lifelogs.com> <87aag38xah.fsf@lifelogs.com> <87vcyrr0ec.fsf@lifelogs.com> <8762qrqwuo.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1302102254 2158 80.91.229.12 (6 Apr 2011 15:04:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 6 Apr 2011 15:04:14 +0000 (UTC) Cc: emacs-devel@gnu.org, ding@gnus.org To: Ted Zlatanov Original-X-From: ding-owner+M26694@lists.math.uh.edu Wed Apr 06 17:04:10 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7UHB-0003XY-EU for ding-account@gmane.org; Wed, 06 Apr 2011 17:04:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Q7UH3-0002K5-78; Wed, 06 Apr 2011 10:04:01 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Q7UH2-0002Jy-AK for ding@lists.math.uh.edu; Wed, 06 Apr 2011 10:04:00 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1Q7UH1-0007c1-4f for ding@lists.math.uh.edu; Wed, 06 Apr 2011 10:04:00 -0500 Original-Received: from v3-1008.vxen.de ([79.140.41.8]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Q7UH0-0000bb-Bf for ding@gnus.org; Wed, 06 Apr 2011 17:03:58 +0200 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=524rk6qej2HiYdle/oZAzGgki6k6Ivj8YQjcQ8mssbQ=; b=CKHC8drX4sXwNQJH09p0EgI5e4Y+yATLTOgbhnEFpLFvC7bZl2g6SJxjfHJnrymFitFQdtx5/87iSs/dduwEYbZf/7SWvlAMrSjDCU+znXM8+2Io7yRX3I1bjTTd8v2I; Original-Received: from [134.76.4.230] (helo=imac.local) by v3-1008.vxen.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Q7UGz-0003Wy-Qb; Wed, 06 Apr 2011 17:03:57 +0200 In-Reply-To: (David Engster's message of "Wed, 06 Apr 2011 16:57:05 +0200") User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (darwin) Mail-Copies-To: never Mail-Followup-To: Ted Zlatanov , emacs-devel@gnu.org, ding@gnus.org X-Spam-Score: -2.0 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78391 gmane.emacs.devel:138240 Archived-At: David Engster writes: > Ted Zlatanov writes: >> On Wed, 06 Apr 2011 15:28:07 +0200 David Engster wrote: >> >> DE> It seems like putting (require 'ert) into an eval-when-compile is not > >> DE> sufficient. You have to require it unconditionally. >> >> DE> So maybe your first idea was The Right Thing To Do, meaning to use >> >> DE> (require 'ert nil t) >> >> DE> and then test for feature 'ert. Alternatively, you could use the current >> DE> hack and put this require in there, too. But this is getting >> DE> increasingly ugly... >> >> See the attached patch, which just adds (require 'ert nil t) *in >> addition* to the defmacro hack. It seems to DTRT for me, let me know >> what you think. > > Yes, that's what I meant with the latter suggestion. I'm not sure if > this is the right way to solve this, but it works for me, too. Addendum: Maybe the "real" solution is to have the tests in a separate file, so that a (require 'registry) won't instantiate the ERT tests. I can see why having the tests in the file itself can be convenient, but usually, test-suites are separated from the actual code? Anyway, I don't really have a strong opinion on this. -David