[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bizarre byte-compile issue, possibly due to EIEIO
From: |
David Engster |
Subject: |
Re: bizarre byte-compile issue, possibly due to EIEIO |
Date: |
Sun, 03 Apr 2011 11:34:42 +0200 |
User-agent: |
Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) |
David Engster writes:
> Ted Zlatanov writes:
>> On Fri, 01 Apr 2011 15:29:38 -0500 Ted Zlatanov <address@hidden> 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
bc-test.el
Description: application/emacs-lisp
- bizarre byte-compile issue, possibly due to EIEIO, Ted Zlatanov, 2011/04/01
- Re: bizarre byte-compile issue, possibly due to EIEIO, Ted Zlatanov, 2011/04/01
- Re: bizarre byte-compile issue, possibly due to EIEIO, Lars Magne Ingebrigtsen, 2011/04/01
- Re: bizarre byte-compile issue, possibly due to EIEIO, Ted Zlatanov, 2011/04/01
- Re: bizarre byte-compile issue, possibly due to EIEIO, David Engster, 2011/04/02
- Re: bizarre byte-compile issue, possibly due to EIEIO,
David Engster <=
- Re: bizarre byte-compile issue, possibly due to EIEIO, Ted Zlatanov, 2011/04/04
- Re: bizarre byte-compile issue, possibly due to EIEIO, David Engster, 2011/04/04
- Message not available
- Re: bizarre byte-compile issue, possibly due to EIEIO, David Engster, 2011/04/05
- Re: bizarre byte-compile issue, possibly due to EIEIO, Ted Zlatanov, 2011/04/05
- Re: bizarre byte-compile issue, possibly due to EIEIO, David Engster, 2011/04/05
- Re: bizarre byte-compile issue, possibly due to EIEIO, Ted Zlatanov, 2011/04/05
- Message not available
- Re: bizarre byte-compile issue, possibly due to EIEIO, Ted Zlatanov, 2011/04/05
- Re: bizarre byte-compile issue, possibly due to EIEIO, Stefan Monnier, 2011/04/04