unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50214: 28.0.50; cl-struct changes may affect user packages in the wild
@ 2021-08-26 16:47 Adam Porter
  2021-08-26 17:50 ` Arthur Miller
  2021-08-26 19:37 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 8+ messages in thread
From: Adam Porter @ 2021-08-26 16:47 UTC (permalink / raw)
  To: 50214

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





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-23 10:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).