GNU bug report logs - #50214
28.0.50; cl-struct changes may affect user packages in the wild

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Adam Porter <adam@HIDDEN>; dated Thu, 26 Aug 2021 16:48:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 50214 <at> debbugs.gnu.org:


Received: (at 50214) by debbugs.gnu.org; 26 Aug 2021 17:52:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 26 13:52:10 2021
Received: from localhost ([127.0.0.1]:50386 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mJJXf-0003qh-1P
	for submit <at> debbugs.gnu.org; Thu, 26 Aug 2021 13:52:10 -0400
Received: from mail-am6eur05olkn2083.outbound.protection.outlook.com
 ([40.92.91.83]:13601 helo=EUR05-AM6-obe.outbound.protection.outlook.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arthur.miller@HIDDEN>) id 1mJJXX-0003qN-Qa
 for 50214 <at> debbugs.gnu.org; Thu, 26 Aug 2021 13:51:54 -0400
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=YZMpmeMfx+z+wOGwhLTEJ/HDtsFjAtM5/LKvCBGQPxD3sW/Y1536HmT75Zgi4wCCKoi/i8o4104ZiUlmvHtW9ylnHm+JWEs+PYLBXNHefzN8Hm8xsetJTEUHoWOPvmTbtk32smqVCcWvHJl078WHuvHJsy8CYoiQJAvrqvYp64SG1TvQvZUQcx/ah/ceMcH+H0w1Kcb1JDmDSHaEB0ON+sESjwozuPO9Iw0e1aAZgO4HWwECkU+t5YSCvc0v/+Jg30sMalQ2m0yXZxPSwac53zi5hC5tzKB3lRNXqepBEJuaP4MoOGTIkol4dCMx0kN8gBMIwH/mp5oBjKtpryg9+A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=4TEfX1Vq8HV0aeePO8fZpu02W3ZVbRL9l5rQxLWj7tA=;
 b=Q1+EnO4iHhJyyFhjNRexp06xCjz7fmxvJ1ifTD9CHSCuSopOsUyJcOuMiZiNk6MmnF9yqkeI21bX3Kl8LFLCbC0MwE38PVLryHgcfWfsR4hjHiEa+syUSPzbKpK6qzghoez5xqkAOB6iiuHRQ6OuiquPtAjbNKH5d8rnSTjz1r8BXC9izOfilhmpPCuDd6rhdggc5qr/KMFamIddU/ZQpfD7yxNw8h86U4cn5tiquvX5/9eablmEMPPTnNSwkeu7dpQGxrx19lB3JIAGOHIhu87liJxxmOsXr0dGlvG+npJs2f7mOrNS2++8TEhocGdt4LuELQ+BSXdI1s6pzv3ZlQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; 
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=4TEfX1Vq8HV0aeePO8fZpu02W3ZVbRL9l5rQxLWj7tA=;
 b=f7/HZXluFpPab0i78cZBRw/gLFTKR9Sp+H067jWbKeyGuqtQkzEl9GvwTSVAOBjlMmFPSgNKNI7KYlH+EkwQgXWfdT9SxpM9+xyboegu0d727Aj2wlIQNo6K8+02lnfLwD2WR7fvS2Aep8vaBkHwbVKagtYlSgcgCFo5qtZ0UcBovNGqxta3lodbTq6wiP8Of3COIisJB6+ofVZsFe+7UqQbJlJH8kOey0ecNDp6QJpH5EW+LQLfXJ6gvvNXVL2OW9MWbE+zGpKkgs9XFaf+b4EHqBieqXKVyDx0Er7ZJVKY3fPA2Nyy5LfkSGqh21ag6KG/fa2BKJ/uJdCDYlinIg==
Received: from DB8EUR05FT024.eop-eur05.prod.protection.outlook.com
 (2a01:111:e400:fc0f::47) by
 DB8EUR05HT073.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::190)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17; Thu, 26 Aug
 2021 17:50:40 +0000
Received: from AM9PR09MB4977.eurprd09.prod.outlook.com
 (2a01:111:e400:fc0f::50) by DB8EUR05FT024.mail.protection.outlook.com
 (2a01:111:e400:fc0f::447) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17 via Frontend
 Transport; Thu, 26 Aug 2021 17:50:40 +0000
X-IncomingTopHeaderMarker: OriginalChecksum:97047A169A7C3DBA0DACDD62C46206FCE5195FCB63E24C1F39ECC3B16681267C;
 UpperCasedChecksum:45A6590522B51282F6343ED202F6E75599298582D3FC57DDD785DD22F6E867B2;
 SizeAsReceived:7497; Count:46
Received: from AM9PR09MB4977.eurprd09.prod.outlook.com
 ([fe80::b483:471e:6dc2:12ae]) by AM9PR09MB4977.eurprd09.prod.outlook.com
 ([fe80::b483:471e:6dc2:12ae%9]) with mapi id 15.20.4436.025; Thu, 26 Aug 2021
 17:50:40 +0000
From: Arthur Miller <arthur.miller@HIDDEN>
To: Adam Porter <adam@HIDDEN>
Subject: Re: bug#50214: 28.0.50; cl-struct changes may affect user packages
 in the wild
References: <CAO_b3FW+nDdXGGVw9hfYCfbf+Od6d9Gbs_wwkjYJseUehtdSQw@HIDDEN>
Date: Thu, 26 Aug 2021 19:50:38 +0200
In-Reply-To: <CAO_b3FW+nDdXGGVw9hfYCfbf+Od6d9Gbs_wwkjYJseUehtdSQw@HIDDEN>
 (Adam Porter's message of "Thu, 26 Aug 2021 11:47:09 -0500")
Message-ID: <AM9PR09MB49775DCCE0CCA067A0B31C5F96C79@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Content-Type: text/plain
X-TMN: [FZxb1aCDtfKYR+o3D7BSzrJw2KwVAPBd]
X-ClientProxiedBy: BE0P281CA0025.DEUP281.PROD.OUTLOOK.COM
 (2603:10a6:b10:14::12) To AM9PR09MB4977.eurprd09.prod.outlook.com
 (2603:10a6:20b:304::20)
X-Microsoft-Original-Message-ID: <875yvs5c41.fsf@HIDDEN>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from pascal.homepc (81.232.177.30) by
 BE0P281CA0025.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:14::12) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4478.6 via Frontend Transport; Thu, 26 Aug 2021 17:50:39 +0000
X-MS-PublicTrafficType: Email
X-IncomingHeaderCount: 46
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-Correlation-Id: b7bd6da8-898f-4c1d-f4e7-08d968ba0463
X-MS-TrafficTypeDiagnostic: DB8EUR05HT073:
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: tpimfXyGVPoMXNU4t6F4xWDan5QJOAdU4asoqjAFqj7hE0Czfnw2oRvj9iyiGQlvPMYIlUY7VhitEuGEunDvhuO9qgmGkyICHbT0oGU47ZsywR52k0i3a4C3Ib449KV6sJFNThA37POTmZI5OYy7A4V2sRNYIBFrCTpL+DWTV8vZ6amGWBorfQ6T1hIKMUN9FbbvGJwEWlSPyyBsZ/0PIitwxVs/B/SFlrpObgrMXEj01WZ79muM0PW9NGLoLYwt9vpOJPy7g9/gESA8XACazuWnaUWFSV0KhAae0l8SnICjIvD345et9QKLzfGoV34q7Jv296SHQQ/c3+jUW5ySZkRZLJGmHxhQ7tfU/oEMAInPEUxDnNFOdxLhU/xHMJkXDQPigcX4wHeoDnXJfwtOP+8Zk1Fg/U6xHoG6apbvvJCaZ5l3norkDvuEVQIq1qBn2QwFYMEMZyVNS8c2QxaLKQx7bpoV4glAyfLnSlIi9W0=
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: xZ0A4Sm/v+YoTy0pCDjWqupVdfBqs+lcZgTUmlc4dgQjiejSyXWpFpnL0UD85uc3FOyufFQXLHPz9GNsjQVFbRJSEOleC6/utsQTmg+Aq3nYLSFiLe0sqsitcATXcyTbVf3AlhAznwcxDzhsJHtHHw==
X-OriginatorOrg: live.com
X-MS-Exchange-CrossTenant-Network-Message-Id: b7bd6da8-898f-4c1d-f4e7-08d968ba0463
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2021 17:50:39.9717 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-AuthSource: DB8EUR05FT024.eop-eur05.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8EUR05HT073
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50214
Cc: 50214 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

Adam Porter <adam@HIDDEN> writes:

> Hi,
>
> A helpful user of my ts.el package discovered a change in Emacs 28
> that breaks it:
>
> https://github.com/alphapapa/ts.el/issues/18
>
> Specifically, this commit changes the internal struct constructor from
> a plist to an alist:
>
> https://github.com/emacs-mirror/emacs/commit/3788d2237d4c65b67b95e33d1aca8d8b41780429
>
> For example:
>
> ;; Emacs 28.0.50
> (nth 1 (cl-struct-slot-info 'ts))
> ;;  =>
> ;; (hour
> ;;  nil
> ;;  :type integer
> ;;  (:accessor-init string-to-number
> ;;   (format-time-string
> ;;    "%H"
> ;;    (ts-unix struct)))
> ;;  (:aliases H)
> ;;  (:constructor . "%H"))
>
> ;; Emacs 27.2.50
> (nth 1 (cl-struct-slot-info 'ts))
> ;;  =>
> ;; (hour
> ;;  nil
> ;;  :type integer
> ;;  :accessor-init (string-to-number
> ;;                  (format-time-string
> ;;                   "%H"
> ;;                   (ts-unix struct)))
> ;;  :aliases (H)
> ;;  :constructor "%H")
>
> Unfortunately this breaks how ts.el works.  Of course, that can be
> worked around with a version check, but that means that users who
> upgrade to Emacs 28 without upgrading ts.el will encounter failures.
>
> I don't know if this is something you'd want to reconsider.  I guess
> there was a good reason for the changes being made.  And maybe what
> ts.el is doing is considered unsupported, which would seem like a
> not-unreasonable position.
>
> Anyway, I'm reporting this so the issue is officially documented and
> any decisions can be made accordingly.
>
> Thanks,
> Adam

So what do we learn for the future? Don't use internal representation in your
apps, it is internal for a reason? :)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50214; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Aug 2021 16:47:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 26 12:47:28 2021
Received: from localhost ([127.0.0.1]:50266 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mJIXH-00080n-V9
	for submit <at> debbugs.gnu.org; Thu, 26 Aug 2021 12:47:28 -0400
Received: from lists.gnu.org ([209.51.188.17]:56872)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <alphadeltapapa@HIDDEN>) id 1mJIXF-0007zA-V3
 for submit <at> debbugs.gnu.org; Thu, 26 Aug 2021 12:47:26 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:41322)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <alphadeltapapa@HIDDEN>)
 id 1mJIXF-0003bE-Mb
 for bug-gnu-emacs@HIDDEN; Thu, 26 Aug 2021 12:47:25 -0400
Received: from mail-lf1-f46.google.com ([209.85.167.46]:40777)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <alphadeltapapa@HIDDEN>)
 id 1mJIXD-0005rB-Sv
 for bug-gnu-emacs@HIDDEN; Thu, 26 Aug 2021 12:47:25 -0400
Received: by mail-lf1-f46.google.com with SMTP id bq28so8182773lfb.7
 for <bug-gnu-emacs@HIDDEN>; Thu, 26 Aug 2021 09:47:22 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=T+SMzDdJb4KVdmGg8AwvJAIDkHD8kmUP7VL1hbSgtwc=;
 b=Kc2l5VVvYUDVMpfhuIPp1FWP2Y+qKsSRMliW7bBwVjGfaqXJQSM1wTQRRiYcZfLvdh
 W7K/RN3evhrq5fvBqv9OrD6TiwbsQZ2ly9fYWbCXtWZ31IpoSNsh1faGfS2SlbWYLsJL
 hnoCkiq1bBZZGKQ1srGaSYC/SVbQztKcuXJN+g4OwxGsAjQpKCaQMo+PVPSboZMSIMgK
 452TRB+evO4phbLhg5EcCfrTdU+LGZc59kF/WmY7djRq4BHn8IkbPlwMHCdcaZYau2dM
 To5s0Z7HZ9ZEl14P2J5y1k5WsVmR7VFwUPsS9Kdik5N8c771oDNCXI+3oL1qufCR9XME
 Ajcw==
X-Gm-Message-State: AOAM532VgTS2bXqoTD1NLdOUYSAtDLzVuHn08xyDmX8Zp02u1s2w0Y3T
 Nfqh9T6vleRjsv6kKDhN6llf6Epak+zaU2nLd6fjzERq9Ns=
X-Google-Smtp-Source: ABdhPJwvWvX6O90iJtIPKmOwssDC0CYjRyOFfpr3n6akTAH/cUe53EvoI1Mxufpg56U+A/zkUH+77QlKdF5xP2M3ZNg=
X-Received: by 2002:a05:6512:398b:: with SMTP id
 j11mr3528799lfu.102.1629996440689; 
 Thu, 26 Aug 2021 09:47:20 -0700 (PDT)
MIME-Version: 1.0
From: Adam Porter <adam@HIDDEN>
Date: Thu, 26 Aug 2021 11:47:09 -0500
Message-ID: <CAO_b3FW+nDdXGGVw9hfYCfbf+Od6d9Gbs_wwkjYJseUehtdSQw@HIDDEN>
Subject: 28.0.50; cl-struct changes may affect user packages in the wild
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=209.85.167.46;
 envelope-from=alphadeltapapa@HIDDEN; helo=mail-lf1-f46.google.com
X-Spam_score_int: -13
X-Spam_score: -1.4
X-Spam_bar: -
X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9,
 FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001,
 HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001,
 RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.8 (-)

Hi,

A helpful user of my ts.el package discovered a change in Emacs 28
that breaks it:

https://github.com/alphapapa/ts.el/issues/18

Specifically, this commit changes the internal struct constructor from
a plist to an alist:

https://github.com/emacs-mirror/emacs/commit/3788d2237d4c65b67b95e33d1aca8d8b41780429

For example:

;; Emacs 28.0.50
(nth 1 (cl-struct-slot-info 'ts))
;;  =>
;; (hour
;;  nil
;;  :type integer
;;  (:accessor-init string-to-number
;;   (format-time-string
;;    "%H"
;;    (ts-unix struct)))
;;  (:aliases H)
;;  (:constructor . "%H"))

;; Emacs 27.2.50
(nth 1 (cl-struct-slot-info 'ts))
;;  =>
;; (hour
;;  nil
;;  :type integer
;;  :accessor-init (string-to-number
;;                  (format-time-string
;;                   "%H"
;;                   (ts-unix struct)))
;;  :aliases (H)
;;  :constructor "%H")

Unfortunately this breaks how ts.el works.  Of course, that can be
worked around with a version check, but that means that users who
upgrade to Emacs 28 without upgrading ts.el will encounter failures.

I don't know if this is something you'd want to reconsider.  I guess
there was a good reason for the changes being made.  And maybe what
ts.el is doing is considered unsupported, which would seem like a
not-unreasonable position.

Anyway, I'm reporting this so the issue is officially documented and
any decisions can be made accordingly.

Thanks,
Adam




Acknowledgement sent to Adam Porter <adam@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#50214; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 26 Aug 2021 18:00:02 UTC

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