GNU bug report logs -
#50214
28.0.50; cl-struct changes may affect user packages in the wild
Previous Next
Reported by: Adam Porter <adam <at> alphapapa.net>
Date: Thu, 26 Aug 2021 16:48:01 UTC
Severity: normal
Tags: moreinfo
Found in version 28.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 50214 <at> debbugs.gnu.org (full text, mbox):
Adam Porter <adam <at> 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? :)
This bug report was last modified 2 years and 274 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.