GNU bug report logs - #31742
26.1.50; excorporate.elc byte-compiled in Emacs 25.x fails in Emacs 26.1

Previous Next

Package: emacs;

Reported by: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>

Date: Thu, 7 Jun 2018 01:08:02 UTC

Severity: normal

Found in version 26.1.50

Done: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 31742 <at> debbugs.gnu.org (full text, mbox):

From: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
To: Alex Harsanyi <alexharsanyi <at> gmail.com>
Cc: Noam Postavsky <npostavs <at> gmail.com>, 31742 <at> debbugs.gnu.org
Subject: Re: bug#31742: 26.1.50;
 excorporate.elc byte-compiled in Emacs 25.x fails in Emacs 26.1
Date: Fri, 08 Jun 2018 22:54:17 -0400
[Message part 1 (text/plain, inline)]
Alex Harsanyi <alexharsanyi <at> gmail.com> writes:

> On Fri, Jun 8, 2018 at 10:18 PM, Thomas Fitzsimmons <fitzsim <at> fitzsim.org> wrote:
>> (CCing Alex Harsanyi.)
>>
>> Noam Postavsky <npostavs <at> gmail.com> writes:
>>
>>> Thomas Fitzsimmons <fitzsim <at> fitzsim.org> writes:
>>>
>>>> Noam Postavsky <npostavs <at> gmail.com> writes:
>>>>
>>>>> Thomas Fitzsimmons <fitzsim <at> fitzsim.org> writes:
>>>>>
>>>>>> (defun soap-resolve-references (element wsdl)
>>>>>
>>>>>>   (let ((resolver (get (aref element 0) 'soap-resolve-references)))
>>>>>
>>>>> Ah, then it should work to replace the (aref element 0) with (type-of
>>>>> element) as long as cl-old-struct-compat-mode is enabled.
>>>>
>>>> Yes, I retested with that change and it does work.  I guess I should
>>>> submit a patch to change all those occurrences in soap-client.
>>>
>>> I just noticed soap-client is also an ELPA package; then there is the
>>> additional complication that type-of will give the wrong answer in Emacs
>>> versions 25 and older.  So you would need something like
>>>
>>>     (let ((type (type-of element)))
>>>       (if (eq type 'vector)
>>>           (aref element 0) ; For Emacs 25 and earlier.
>>>         type))
>>
>> OK, I had that on my list to investigate before patching soap-client,
>> the compatibility range of type-of, but you've done it for me, thanks.
>> A soap-type-of compatibility function probably makes sense to replace
>> the (aref ... 0) occurrences in soap-client and soap-inspect.
>>
>>>> I'm hoping cl-old-struct-compat-mode will continue to be enabled by
>>>> default for a long time.
>>>
>
> The `(aref element 0)` trick is the only one that `soap-client` uses.  All
> other struct usage is via accessor functions, the rest of the code does not
> assume they are vectors.  It seems to me that `cl-old-struct-compat-mode` is
> not needed.

OK.

> Thomas, will you prepare the patch for soap-client?

How about the attached?  I tested it in 26.1 with 25.1 excorporate.elc
byte-code, as well as with our test suite against 24.1, 25.1 and 26.1,
so it should be OK for GNU ELPA as well.

If this looks OK, I'll bump the soap-client.el version to 3.1.4 when I
push.

Thomas

[0001-soap-client-Add-byte-code-compatibility-function.patch (text/x-patch, attachment)]

This bug report was last modified 7 years and 53 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.