From: Thomas Fitzsimmons <fitzsim@fitzsim.org>
To: Alex Harsanyi <alexharsanyi@gmail.com>
Cc: Noam Postavsky <npostavs@gmail.com>, 31742@debbugs.gnu.org
Subject: bug#31742: 26.1.50; excorporate.elc byte-compiled in Emacs 25.x fails in Emacs 26.1
Date: Sat, 09 Jun 2018 06:30:21 -0400 [thread overview]
Message-ID: <m3r2lg2qwy.fsf@fitzsim.org> (raw)
In-Reply-To: <CAH-ciFq2+iKKFmOdvTvZXPVonJA7d6PcVytg6hQCzTG63cTYhQ@mail.gmail.com> (Alex Harsanyi's message of "Sat, 9 Jun 2018 08:01:31 +0800")
Alex Harsanyi <alexharsanyi@gmail.com> writes:
> On Fri, Jun 8, 2018 at 10:18 PM, Thomas Fitzsimmons <fitzsim@fitzsim.org> wrote:
>> (CCing Alex Harsanyi.)
>>
>> Noam Postavsky <npostavs@gmail.com> writes:
>>
>>> Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:
>>>
>>>> Noam Postavsky <npostavs@gmail.com> writes:
>>>>
>>>>> Thomas Fitzsimmons <fitzsim@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.
I went back and tested with cl-old-struct-compat-mode disabled, with the
soap-type-of patch, and I get an earlier failure, via M-x excorporate:
Debugger entered--Lisp error: (wrong-type-argument soap-element [cl-struct-soap-port "ExchangeServicePort" [...]
signal(wrong-type-argument (soap-element [cl-struct-soap-port "ExchangeServicePort" nil [...]
(or (and (memq (type-of element) cl-struct-soap-element-tags) t) (signal 'wrong-type-argument (list 'soap-ele [...]
(progn (or (and (memq (type-of element) cl-struct-soap-element-tags) t) (signal 'wrong-type-argument (list 's [...]
(let ((name (progn (or (and (memq (type-of element) cl-struct-soap-element-tags) t) (signal 'wrong-type-argum [...]
soap-namespace-put([cl-struct-soap-port "ExchangeServicePort" nil "https://[redacted]/ews/exchange.asmx" [...]
exco--bind-wsdl(#s(soap-wsdl :origin "https://[redacted]/ews/exchange.asmx" :current-file nil :xmlschema- [...]
#f(compiled-function (fsm state-data) #<bytecode 0x105c08f9>)(fsm-exco--fsm-47 (:identifier ("fitzsim@cisco. [...]
fsm-update(fsm-exco--fsm-47 :retrieving-data (:identifier ("fitzsim@cisco.com" . "https://[redacted]/ews [...]
fsm-send-sync(fsm-exco--fsm-47 t nil)
apply(fsm-send-sync (fsm-exco--fsm-47 t nil))
timer-event-handler([t 23323 41935 594437 nil fsm-send-sync (fsm-exco--fsm-47 t nil) nil 155000])
The old/new cl-struct mixing happens because excorporate.elc (25.1
byte-code) calls make-soap-port, and passes the result to soap-client
(26.1). So at least for Excorporate, cl-old-struct-compat-mode is
needed (in addition to the (aref ... 0) -> (soap-type-of ...)
soap-client change).
Thomas
next prev parent reply other threads:[~2018-06-09 10:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-07 1:07 bug#31742: 26.1.50; excorporate.elc byte-compiled in Emacs 25.x fails in Emacs 26.1 Thomas Fitzsimmons
2018-06-07 1:14 ` Noam Postavsky
2018-06-07 2:01 ` Thomas Fitzsimmons
2018-06-07 12:21 ` Noam Postavsky
2018-06-07 14:06 ` Thomas Fitzsimmons
2018-06-07 17:36 ` Noam Postavsky
2018-06-08 1:13 ` Thomas Fitzsimmons
2018-06-08 1:57 ` Noam Postavsky
2018-06-08 2:17 ` Thomas Fitzsimmons
2018-06-08 12:19 ` Noam Postavsky
2018-06-08 14:18 ` Thomas Fitzsimmons
2018-06-09 0:01 ` Alex Harsanyi
2018-06-09 2:54 ` Thomas Fitzsimmons
2018-06-09 9:13 ` Alex Harsanyi
2018-06-09 10:32 ` Thomas Fitzsimmons
2018-06-12 1:55 ` Thomas Fitzsimmons
2018-06-12 17:11 ` Eli Zaretskii
2018-06-13 1:39 ` Thomas Fitzsimmons
2018-06-17 0:12 ` Alex Harsanyi
2018-06-17 0:36 ` Thomas Fitzsimmons
2018-06-17 1:31 ` Alex Harsanyi
2018-06-17 1:36 ` Noam Postavsky
2018-06-17 13:02 ` Thomas Fitzsimmons
2018-06-09 10:30 ` Thomas Fitzsimmons [this message]
2018-06-09 12:13 ` Noam Postavsky
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3r2lg2qwy.fsf@fitzsim.org \
--to=fitzsim@fitzsim.org \
--cc=31742@debbugs.gnu.org \
--cc=alexharsanyi@gmail.com \
--cc=npostavs@gmail.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).