From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87po132y9k.fsf@gmail.com> <87h8me3hyw.fsf@gmail.com> <87zi0611m6.fsf@gmail.com> <87vaat1ndq.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1528540151 13085 195.159.176.226 (9 Jun 2018 10:29:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 9 Jun 2018 10:29:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) Cc: Noam Postavsky , 31742@debbugs.gnu.org To: Alex Harsanyi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 09 12:29:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRb7J-0003Fs-3Q for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jun 2018 12:29:05 +0200 Original-Received: from localhost ([::1]:39745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRb9O-0008KF-Ch for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jun 2018 06:31:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRb9F-0008Jy-Lu for bug-gnu-emacs@gnu.org; Sat, 09 Jun 2018 06:31:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRb9C-0005FR-BH for bug-gnu-emacs@gnu.org; Sat, 09 Jun 2018 06:31:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60688) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRb9C-0005FN-6V for bug-gnu-emacs@gnu.org; Sat, 09 Jun 2018 06:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fRb9C-0006xS-0f for bug-gnu-emacs@gnu.org; Sat, 09 Jun 2018 06:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Jun 2018 10:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31742 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31742-submit@debbugs.gnu.org id=B31742.152854023026706 (code B ref 31742); Sat, 09 Jun 2018 10:31:01 +0000 Original-Received: (at 31742) by debbugs.gnu.org; 9 Jun 2018 10:30:30 +0000 Original-Received: from localhost ([127.0.0.1]:40352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRb8g-0006wg-98 for submit@debbugs.gnu.org; Sat, 09 Jun 2018 06:30:30 -0400 Original-Received: from mail-io0-f180.google.com ([209.85.223.180]:33575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRb8e-0006wR-KE for 31742@debbugs.gnu.org; Sat, 09 Jun 2018 06:30:29 -0400 Original-Received: by mail-io0-f180.google.com with SMTP id d185-v6so18706894ioe.0 for <31742@debbugs.gnu.org>; Sat, 09 Jun 2018 03:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=yTcpfIWd6WvXsDqSe4NijMtr09zABmAid4YyZe0qDZU=; b=R5K7shpvO6dNuJi3r12c0xIvviINHj9R11P8J1ufuQaXuc9IHgpD7DP1neksgnnS4b 0vdIXKd+2WdXzJuJqKGn/hnypXxUHhh7PnStglchQfzZZXVRvIfXstpwYjAuet5yxKc7 wDqGFOl+CPpLnNYH9v4r4Bl7damvG6Wp9b29Xq+MxBp5j+nb/gW3u3ryG7peNtmdPnqH qWrGOK/6lIRdnwcwV9OvsJKg3eMZHPxa1HdEw3CEhIg+MLuocdyAkU11LNKozl7Eexxp 6QeLSN1RQNcFrJbqL50KvhWmNP2y9HULEmtmQm6dio7xeLW7sPW5/VoYfGM89Wij6Mjd lRYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=yTcpfIWd6WvXsDqSe4NijMtr09zABmAid4YyZe0qDZU=; b=PRORCcl/65OQNmjQmsoz9YSW1RqZKExti3COsq7y6q9wLLsH7wl1lEFdw8rH8S3RHT zAf3hLBqjZqldKmq/UZS9Bvb6CAUNPJp+ApLwYStbKBfIw80Ao04J3GVu77S4kc01JxE MbR5eyRG7kEYdLDNdTO02ORgPttJ5t0i2pFWfYCIkeEvCnz+Wyzqg8ZyPOJc+zziQdQb ttPKXQ20iwyNF4Qmeros9sl7ATvxplb4S/p7xIDTUdm9gbyL0K2XcdfMlVRlXBXloaOC WjJC07yOir4uYr1Ij33hYGnFvRHdge3EGXiod3go0ExWjli+NKp9Izt6U8aK5QnPHvxw gduw== X-Gm-Message-State: APt69E2uTTF4H3xyZLrs0faPtiZtRKT1pYTH26b9R0HiZHEr5PGo6IoT fmp6LJRKbu0WOChPacMu5dImNzOWV1o= X-Google-Smtp-Source: ADUXVKJ3shlFF8gT/Tgv+psPO1hzJ6lixK9AgjUUGSryVAD/zw1SqTo4Kedon87VcWclN2vWLI4Qvw== X-Received: by 2002:a6b:f00a:: with SMTP id w10-v6mr8769209ioc.176.1528540222834; Sat, 09 Jun 2018 03:30:22 -0700 (PDT) Original-Received: from hp-dv5t (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id k19-v6sm1916339itb.35.2018.06.09.03.30.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Jun 2018 03:30:22 -0700 (PDT) In-Reply-To: (Alex Harsanyi's message of "Sat, 9 Jun 2018 08:01:31 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147233 Archived-At: Alex Harsanyi writes: > On Fri, Jun 8, 2018 at 10:18 PM, Thomas Fitzsimmons wrote: >> (CCing Alex Harsanyi.) >> >> Noam Postavsky writes: >> >>> Thomas Fitzsimmons writes: >>> >>>> Noam Postavsky writes: >>>> >>>>> Thomas Fitzsimmons 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) #)(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