GNU bug report logs - #49734
28.0.50; define-obsolete-variable-alias

Previous Next

Package: emacs;

Reported by: Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net>

Date: Sun, 25 Jul 2021 18:12:02 UTC

Severity: minor

Tags: wontfix

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49734 in the body.
You can then email your comments to 49734 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#49734; Package emacs. (Sun, 25 Jul 2021 18:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 25 Jul 2021 18:12:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; define-obsolete-variable-alias
Date: Sun, 25 Jul 2021 14:11:07 -0400
This change breaks existing libraries.
Better to deprecate old forms for a few years
rather than gratuitously and prematurely sow chaos.

		Peace
			--Devon

P.S.  Please undo this incompatible change:

--- emacs-27.2/lisp/emacs-lisp/byte-run.el
+++ emacs-28.0.50/lisp/emacs-lisp/byte-run.el
⋮
-(defun make-obsolete-variable (obsolete-name current-name &optional when access-type)
+(defun make-obsolete-variable ( obsolete-name current-name when
+                                &optional access-type)

In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
 of 2021-06-20 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.1671
System Description:  Mac OS X 10.14.6

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS
TOOLKIT_SCROLL_BARS ZLIB

Important settings:
  value of $LANG: en_BE <at> currency=USD.UTF-8
  locale-coding-system: utf-8-unix

Major mode: ELisp/d

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
time-date warnings thingatpt browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map seq gv url-vars mailcap byte-opt compile
text-property-search comint ansi-color ring bytecomp byte-compile cconv
dired-aux cl-loaddefs cl-lib dired dired-loaddefs iso-transl tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads kqueue
cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 67763 8788)
 (symbols 48 7652 1)
 (strings 32 23129 1733)
 (string-bytes 1 753985)
 (vectors 16 14734)
 (vector-slots 8 197384 12385)
 (floats 8 26 332)
 (intervals 56 398 0)
 (buffers 992 18))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49734; Package emacs. (Sun, 25 Jul 2021 18:30:02 GMT) Full text and rfc822 format available.

Message #8 received at 49734 <at> debbugs.gnu.org (full text, mbox):

From: Devon Sean McCullough <Devon2020 <at> jovi.net>
To: 49734 <at> debbugs.gnu.org
Subject: oops
Date: Sun, 25 Jul 2021 14:29:54 -0400
Should read
--- old/byte-run.el	2021-01-28 12:52:37.000000000 -0500
+++ new/byte-run.el	2021-06-20 03:01:25.000000000 -0400
⋮
-(defmacro define-obsolete-variable-alias (obsolete-name current-name
-						 &optional when docstring)
+(defmacro define-obsolete-variable-alias ( obsolete-name current-name when
+                                           &optional docstring)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49734; Package emacs. (Sun, 25 Jul 2021 19:53:02 GMT) Full text and rfc822 format available.

Message #11 received at 49734 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net>, "49734 <at> debbugs.gnu.org"
 <49734 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#49734: 28.0.50; define-obsolete-variable-alias
Date: Sun, 25 Jul 2021 19:52:48 +0000
> This change breaks existing libraries.
> Better to deprecate old forms for a few years
> rather than gratuitously and prematurely sow chaos.
> 
> P.S.  Please undo this incompatible change:
> 
> -(defun make-obsolete-variable (obsolete-name current-name &optional when
> access-type)
> +(defun make-obsolete-variable ( obsolete-name current-name when
> +                                &optional access-type)

+1.

In general, moving an optional arg to mandatory
makes things harder for code that tries to support
multiple releases.  And it doesn't gain Emacs much,
other than perhaps a byte-compiler warning for more
recent code that omits the now-mandatory arg.

Does this arg really need to _be_ mandatory now, or
is this just another turn of the screw to provide
additional warning support by the compiler?

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49734; Package emacs. (Mon, 26 Jul 2021 17:51:02 GMT) Full text and rfc822 format available.

Message #14 received at 49734 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net>
Cc: 49734 <at> debbugs.gnu.org
Subject: Re: bug#49734: 28.0.50; define-obsolete-variable-alias
Date: Mon, 26 Jul 2021 13:50:41 -0400
Devon Sean McCullough wrote:

> Better to deprecate old forms for a few years

Is 11 years enough time?

https://lists.gnu.org/r/emacs-diffs/2009-10/msg00032.html

For a less flippant answer, there was a byte compilation warning
intended here, but it seems like it may not have been working
for define-obsolete-variable-alias (unlike, say, make-obsolete-variable).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49734; Package emacs. (Mon, 26 Jul 2021 18:27:02 GMT) Full text and rfc822 format available.

Message #17 received at 49734 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net>
Cc: 49734 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#49734: 28.0.50; define-obsolete-variable-alias
Date: Mon, 26 Jul 2021 20:26:18 +0200
Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net> writes:

> This change breaks existing libraries.
> Better to deprecate old forms for a few years
> rather than gratuitously and prematurely sow chaos.

[...]

> -(defun make-obsolete-variable (obsolete-name current-name &optional when access-type)
> +(defun make-obsolete-variable ( obsolete-name current-name when
> +                                &optional access-type)

Stefan?  Looks like this change is causing problems...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49734; Package emacs. (Tue, 27 Jul 2021 15:47:02 GMT) Full text and rfc822 format available.

Message #20 received at 49734 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net>
Cc: 49734 <at> debbugs.gnu.org
Subject: Re: bug#49734: 28.0.50; define-obsolete-variable-alias
Date: Tue, 27 Jul 2021 11:46:18 -0400
Devon Sean McCullough [2021-07-25 14:11:07] wrote:
> This change breaks existing libraries.
> Better to deprecate old forms for a few years
> rather than gratuitously and prematurely sow chaos.

Fully, agreed.  That's why the old form was made obsolete back in 2009,
so it can now be removed non-prematurely and without sowing chaos ;-)


        Stefan


PS: Here's what the NEWS says about it:

    ** The WHEN argument of 'make-obsolete' and related functions is mandatory.
    The use of those functions without a WHEN argument was marked obsolete
    back in Emacs 23.1.  The affected functions are: 'make-obsolete',
    'define-obsolete-function-alias', 'make-obsolete-variable',
    'define-obsolete-variable-alias'.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49734; Package emacs. (Tue, 27 Jul 2021 17:05:02 GMT) Full text and rfc822 format available.

Message #23 received at 49734 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 49734 <at> debbugs.gnu.org, Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net>
Subject: Re: bug#49734: 28.0.50; define-obsolete-variable-alias
Date: Tue, 27 Jul 2021 13:04:21 -0400
Yes, but bear in mind:
1) The elisp manual has never been updated for this change.
2) The Emacs 23.1 change was not in NEWS.
3) Consider the byte compilation warnings for the following code in eg
Emacs 27.1:

(make-obsolete 'my-foo 'my-foo2)
(define-obsolete-variable-alias 'my-foo3 'my-foo4)

   foo.el:1:2:Warning: make-obsolete called with 2 arguments, but requires 3
Ie no warning for define-obsolete-variable-alias.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49734; Package emacs. (Wed, 28 Jul 2021 15:34:02 GMT) Full text and rfc822 format available.

Message #26 received at 49734 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 49734 <at> debbugs.gnu.org, Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#49734: 28.0.50; define-obsolete-variable-alias
Date: Wed, 28 Jul 2021 17:32:50 +0200
Glenn Morris <rgm <at> gnu.org> writes:

> 3) Consider the byte compilation warnings for the following code in eg
> Emacs 27.1:
>
> (make-obsolete 'my-foo 'my-foo2)
> (define-obsolete-variable-alias 'my-foo3 'my-foo4)
>
>    foo.el:1:2:Warning: make-obsolete called with 2 arguments, but requires 3
> Ie no warning for define-obsolete-variable-alias.

So we didn't have any warning about `define-obsolete-variable-alias' --
so I think we'll have to make the third argument optional again, and
this time make the warning stuff work?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49734; Package emacs. (Sun, 21 Aug 2022 20:47:02 GMT) Full text and rfc822 format available.

Message #29 received at 49734 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 49734 <at> debbugs.gnu.org, Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#49734: 28.0.50; define-obsolete-variable-alias
Date: Sun, 21 Aug 2022 22:46:08 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> So we didn't have any warning about `define-obsolete-variable-alias' --
> so I think we'll have to make the third argument optional again, and
> this time make the warning stuff work?

This was a year ago, so I guess we forgot all about this.

And Emacs 28.1 was released with the WHEN as non-optional, so I think
it's too late to do anything about this at this point.

So I'm closing this bug report.




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 21 Aug 2022 20:47:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 49734 <at> debbugs.gnu.org and Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 21 Aug 2022 20:47:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 19 Sep 2022 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 299 days ago.

Previous Next


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