From: Arthur Miller <arthur.miller@live.com>
To: Adam Porter <adam@alphapapa.net>
Cc: 50214@debbugs.gnu.org
Subject: bug#50214: 28.0.50; cl-struct changes may affect user packages in the wild
Date: Thu, 26 Aug 2021 19:50:38 +0200 [thread overview]
Message-ID: <AM9PR09MB49775DCCE0CCA067A0B31C5F96C79@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <CAO_b3FW+nDdXGGVw9hfYCfbf+Od6d9Gbs_wwkjYJseUehtdSQw@mail.gmail.com> (Adam Porter's message of "Thu, 26 Aug 2021 11:47:09 -0500")
Adam Porter <adam@alphapapa.net> 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? :)
next prev parent reply other threads:[~2021-08-26 17:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 16:47 bug#50214: 28.0.50; cl-struct changes may affect user packages in the wild Adam Porter
2021-08-26 17:50 ` Arthur Miller [this message]
2021-08-26 19:37 ` Lars Ingebrigtsen
2021-08-26 20:52 ` Adam Porter
2021-09-04 17:37 ` Philipp
2022-08-22 14:35 ` Lars Ingebrigtsen
2022-08-22 21:24 ` Adam Porter
2022-08-23 10:08 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM9PR09MB49775DCCE0CCA067A0B31C5F96C79@AM9PR09MB4977.eurprd09.prod.outlook.com \
--to=arthur.miller@live.com \
--cc=50214@debbugs.gnu.org \
--cc=adam@alphapapa.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.