From: David Engster <deng@randomsample.de>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: ding@gnus.org, emacs-devel@gnu.org
Subject: Re: bizarre byte-compile issue, possibly due to EIEIO
Date: Sun, 03 Apr 2011 11:34:42 +0200 [thread overview]
Message-ID: <87sjtzznil.fsf@randomsample.de> (raw)
In-Reply-To: <87lizs9w5e.fsf@randomsample.de> (David Engster's message of "Sat, 02 Apr 2011 23:32:45 +0200")
[-- Attachment #1: Type: text/plain, Size: 1864 bytes --]
David Engster writes:
> Ted Zlatanov writes:
>> On Fri, 01 Apr 2011 15:29:38 -0500 Ted Zlatanov <tzz@lifelogs.com> 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.
>
> 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:
[...]
I tested a little bit more. I created a short test case which I attached
to this mail. Run it by doing
emacs --batch -L . -l bc-test -f bc-test
If everything works, you should get
Method with mapcar: (("20" "foo 20") ("30" "foo 30") ("40" "foo 40"))
Method with loop: (("20" "foo 20") ("30" "foo 30") ("40" "foo 40"))
Here's what I observe:
* The 'mapcar' method always works.
* If you don't byte-compile, the 'loop' method will also work.
* If you byte-compile, the 'loop' method will fail with Emacs24 *before*
the lexbind merge. After the lexbind merge, it works as expected.
Note that the :initform evaluation will not work with the EIEIO version
which ships with Emacs23. I remember some discussions regarding this
issue; it's probably best to use an explicit constructor. I included it
in the test case (you have to uncomment it). When using the class w/
constructor, you can also compile it under Emacs23, and the 'loop'
method will then also fail. The funny thing is that Emacs24 *after* the
lexbind merge cannot run that byte-compiled code from Emacs23; is that
to be expected?
-David
[-- Attachment #2: bc-test.el --]
[-- Type: application/emacs-lisp, Size: 1552 bytes --]
next prev parent reply other threads:[~2011-04-03 9:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 20:29 bizarre byte-compile issue, possibly due to EIEIO Ted Zlatanov
2011-04-01 20:31 ` Ted Zlatanov
2011-04-01 20:50 ` Lars Magne Ingebrigtsen
2011-04-02 0:54 ` Ted Zlatanov
2011-04-02 20:34 ` Lars Magne Ingebrigtsen
2011-04-04 13:47 ` Ted Zlatanov
2011-04-04 15:26 ` David Engster
2011-04-02 21:32 ` David Engster
2011-04-03 9:34 ` David Engster [this message]
2011-04-04 10:18 ` Ted Zlatanov
2011-04-04 15:34 ` David Engster
2011-04-05 15:56 ` Ted Zlatanov
2011-04-05 16:38 ` David Engster
2011-04-05 17:55 ` Ted Zlatanov
2011-04-05 18:31 ` David Engster
2011-04-05 18:44 ` Ted Zlatanov
2011-04-05 16:14 ` Ted Zlatanov
2011-04-05 17:57 ` Ted Zlatanov
2011-04-04 16:29 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sjtzznil.fsf@randomsample.de \
--to=deng@randomsample.de \
--cc=ding@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=tzz@lifelogs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.