GNU bug report logs - #25556
26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings

Previous Next

Package: emacs;

Reported by: David Engster <deng <at> randomsample.de>

Date: Fri, 27 Jan 2017 20:40:02 UTC

Severity: minor

Tags: fixed

Found in version 26.0.50.1

Fixed in version 27.1

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 25556 in the body.
You can then email your comments to 25556 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#25556; Package emacs. (Fri, 27 Jan 2017 20:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Engster <deng <at> randomsample.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 27 Jan 2017 20:40:02 GMT) Full text and rfc822 format available.

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

From: David Engster <deng <at> randomsample.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
Date: Fri, 27 Jan 2017 21:38:58 +0100
I'm currently trying to fix compiler warnings during the CEDET compile
in Emacs master, but there's one annoying problem I'm unsure how to
fix. Whenever a file does (require 'eieio), and EIEIO is not yet
byte-compiled, those two warnings are issued:

../../emacs-lisp/eieio.el: ‘eieio-object-name-string’ is an obsolete generic function (as of 25.1); use ‘eieio-named’ instead.
../../emacs-lisp/eieio.el: ‘destructor’ is an obsolete generic function (as of 26.1).

Since EIEIO is compiled pretty late, one is flooded with these warnings
when compiling Emacs master. The warnings seems to come from the
cl-defgeneric for `eieio-object-name-string' and `destructor'. How can
this be dealt with?

-David




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25556; Package emacs. (Sat, 28 Jan 2017 07:17:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: David Engster <deng <at> randomsample.de>
Cc: 25556 <at> debbugs.gnu.org
Subject: Re: bug#25556: 26.0.50.1;
 Requiring uncompiled eieio issues obsoletion warnings
Date: Sat, 28 Jan 2017 09:15:43 +0200
> From: David Engster <deng <at> randomsample.de>
> Date: Fri, 27 Jan 2017 21:38:58 +0100
> 
> I'm currently trying to fix compiler warnings during the CEDET compile
> in Emacs master, but there's one annoying problem I'm unsure how to
> fix. Whenever a file does (require 'eieio), and EIEIO is not yet
> byte-compiled, those two warnings are issued:
> 
> ../../emacs-lisp/eieio.el: ‘eieio-object-name-string’ is an obsolete generic function (as of 25.1); use ‘eieio-named’ instead.
> ../../emacs-lisp/eieio.el: ‘destructor’ is an obsolete generic function (as of 26.1).
> 
> Since EIEIO is compiled pretty late, one is flooded with these warnings
> when compiling Emacs master. The warnings seems to come from the
> cl-defgeneric for `eieio-object-name-string' and `destructor'. How can
> this be dealt with?

Is it possibel to arrange that these files be compiled sooner?  We
already have some targets for similar purposes in lisp/Makefile.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25556; Package emacs. (Sat, 28 Jan 2017 08:40:01 GMT) Full text and rfc822 format available.

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

From: David Engster <deng <at> randomsample.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25556 <at> debbugs.gnu.org
Subject: Re: bug#25556: 26.0.50.1;
 Requiring uncompiled eieio issues obsoletion warnings
Date: Sat, 28 Jan 2017 09:39:42 +0100
Eli Zaretskii writes:
>> From: David Engster <deng <at> randomsample.de>
>> Date: Fri, 27 Jan 2017 21:38:58 +0100
>> 
>
>> I'm currently trying to fix compiler warnings during the CEDET compile
>> in Emacs master, but there's one annoying problem I'm unsure how to
>> fix. Whenever a file does (require 'eieio), and EIEIO is not yet
>> byte-compiled, those two warnings are issued:
>> 
>> ../../emacs-lisp/eieio.el: ‘eieio-object-name-string’ is an obsolete
>> generic function (as of 25.1); use ‘eieio-named’ instead.
>> ../../emacs-lisp/eieio.el: ‘destructor’ is an obsolete generic
>> function (as of 26.1).
>> 
>> Since EIEIO is compiled pretty late, one is flooded with these warnings
>> when compiling Emacs master. The warnings seems to come from the
>> cl-defgeneric for `eieio-object-name-string' and `destructor'. How can
>> this be dealt with?
>
> Is it possibel to arrange that these files be compiled sooner?  We
> already have some targets for similar purposes in lisp/Makefile.

I'm sure that's possible, but why does the file that declares those
constructs obsolete *itself* throw these warnings? I was hoping that
this could be fixed instead.

-David




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25556; Package emacs. (Sat, 28 Jan 2017 14:31:01 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25556 <at> debbugs.gnu.org
Subject: Re: bug#25556: 26.0.50.1;
 Requiring uncompiled eieio issues obsoletion warnings
Date: Sat, 28 Jan 2017 09:31:37 -0500
David Engster <deng <at> randomsample.de> writes:

> Eli Zaretskii writes:
>>> From: David Engster <deng <at> randomsample.de>
>>> Date: Fri, 27 Jan 2017 21:38:58 +0100
>>> 
>>
>>> I'm currently trying to fix compiler warnings during the CEDET compile
>>> in Emacs master, but there's one annoying problem I'm unsure how to
>>> fix. Whenever a file does (require 'eieio), and EIEIO is not yet
>>> byte-compiled, those two warnings are issued:
>>> 
>>> ../../emacs-lisp/eieio.el: ‘eieio-object-name-string’ is an obsolete
>>> generic function (as of 25.1); use ‘eieio-named’ instead.
>>> ../../emacs-lisp/eieio.el: ‘destructor’ is an obsolete generic
>>> function (as of 26.1).
>>> 
>>> Since EIEIO is compiled pretty late, one is flooded with these warnings
>>> when compiling Emacs master. The warnings seems to come from the
>>> cl-defgeneric for `eieio-object-name-string' and `destructor'. How can
>>> this be dealt with?
>>
>> Is it possibel to arrange that these files be compiled sooner?  We
>> already have some targets for similar purposes in lisp/Makefile.
>
> I'm sure that's possible, but why does the file that declares those
> constructs obsolete *itself* throw these warnings? I was hoping that
> this could be fixed instead.

I'm not sure about `eieio-object-name-string', but the message about
`destructor' is because cl-defgeneric makes the declaration handling
code run before the function defining code, so the symbol is declared
obsolete before it's defined and the definition itself triggers the
obsolete warning.  The patch below moves it around and stops the
`destructor' warning:

--- i/lisp/emacs-lisp/cl-generic.el
+++ w/lisp/emacs-lisp/cl-generic.el
@@ -226,7 +226,13 @@ cl-defgeneric
     (when (eq 'setf (car-safe name))
       (require 'gv)
       (setq name (gv-setter (cadr name))))
-    `(progn
+    `(prog1
+         (progn
+           (defalias ',name
+             (cl-generic-define ',name ',args ',(nreverse options))
+             ,(help-add-fundoc-usage doc args))
+           ,@(mapcar (lambda (method) `(cl-defmethod ,name ,@method))
+                     (nreverse methods)))
        ,@(mapcar (lambda (declaration)
                    (let ((f (cdr (assq (car declaration)
                                        defun-declarations-alist))))
@@ -235,12 +241,7 @@ cl-defgeneric
                       (t (message "Warning: Unknown defun property `%S' in %S"
                                   (car declaration) name)
                          nil))))
-                 (cdr declarations))
-       (defalias ',name
-         (cl-generic-define ',name ',args ',(nreverse options))
-         ,(help-add-fundoc-usage doc args))
-       ,@(mapcar (lambda (method) `(cl-defmethod ,name ,@method))
-                 (nreverse methods)))))
+                 (cdr declarations)))))
 
 ;;;###autoload
 (defun cl-generic-define (name args options)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25556; Package emacs. (Sat, 28 Jan 2017 21:16:01 GMT) Full text and rfc822 format available.

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

From: David Engster <deng <at> randomsample.de>
To: npostavs <at> users.sourceforge.net
Cc: Eli Zaretskii <eliz <at> gnu.org>, 25556 <at> debbugs.gnu.org
Subject: Re: bug#25556: 26.0.50.1;
 Requiring uncompiled eieio issues obsoletion warnings
Date: Sat, 28 Jan 2017 22:15:20 +0100
'npostavs' writes:
> David Engster <deng <at> randomsample.de> writes:
>
>> Eli Zaretskii writes:
>>>> From: David Engster <deng <at> randomsample.de>
>>>> Date: Fri, 27 Jan 2017 21:38:58 +0100
>>>> 
>>>
>>>> I'm currently trying to fix compiler warnings during the CEDET compile
>>>> in Emacs master, but there's one annoying problem I'm unsure how to
>>>> fix. Whenever a file does (require 'eieio), and EIEIO is not yet
>>>> byte-compiled, those two warnings are issued:
>>>> 
>>>> ../../emacs-lisp/eieio.el: ‘eieio-object-name-string’ is an obsolete
>>>> generic function (as of 25.1); use ‘eieio-named’ instead.
>>>> ../../emacs-lisp/eieio.el: ‘destructor’ is an obsolete generic
>>>> function (as of 26.1).
>>>> 
>>>> Since EIEIO is compiled pretty late, one is flooded with these warnings
>>>> when compiling Emacs master. The warnings seems to come from the
>>>> cl-defgeneric for `eieio-object-name-string' and `destructor'. How can
>>>> this be dealt with?
>>>
>>> Is it possibel to arrange that these files be compiled sooner?  We
>>> already have some targets for similar purposes in lisp/Makefile.
>>
>> I'm sure that's possible, but why does the file that declares those
>> constructs obsolete *itself* throw these warnings? I was hoping that
>> this could be fixed instead.
>
> I'm not sure about `eieio-object-name-string', but the message about
> `destructor' is because cl-defgeneric makes the declaration handling
> code run before the function defining code, so the symbol is declared
> obsolete before it's defined and the definition itself triggers the
> obsolete warning.  The patch below moves it around and stops the
> `destructor' warning:

Thanks for looking into to it, your patch works fine for me. Can this be
applied?

As for eieio-object-name-string, my guess is that this is caused by
declaring it via cl-defgeneric as well as cl-defmethod (the latter even
twice: in eieio.el and eieio-base.el).

-David




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25556; Package emacs. (Sun, 29 Jan 2017 16:20:02 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: 25556 <at> debbugs.gnu.org
Cc: Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#25556: 26.0.50.1;
 Requiring uncompiled eieio issues obsoletion warnings
Date: Sun, 29 Jan 2017 11:20:27 -0500
David Engster <deng <at> randomsample.de> writes:

>>
>> I'm not sure about `eieio-object-name-string', but the message about
>> `destructor' is because cl-defgeneric makes the declaration handling
>> code run before the function defining code, so the symbol is declared
>> obsolete before it's defined and the definition itself triggers the
>> obsolete warning.  The patch below moves it around and stops the
>> `destructor' warning:
>
> Thanks for looking into to it, your patch works fine for me. Can this be
> applied?

I pushed to master [1: 9bf9463].

1: 2017-01-29 11:16:06 -0500 9bf94639b8f674d2c7894df35f26f09d0ecc67f5
  Don't warn about obsolete defgenerics when defining them




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25556; Package emacs. (Sun, 29 Jan 2017 21:24:02 GMT) Full text and rfc822 format available.

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

From: David Engster <deng <at> randomsample.de>
To: npostavs <at> users.sourceforge.net
Cc: 25556 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#25556: 26.0.50.1;
 Requiring uncompiled eieio issues obsoletion warnings
Date: Sun, 29 Jan 2017 22:23:34 +0100
'npostavs' writes:
> David Engster <deng <at> randomsample.de> writes:
>
>>>
>>> I'm not sure about `eieio-object-name-string', but the message about
>>> `destructor' is because cl-defgeneric makes the declaration handling
>>> code run before the function defining code, so the symbol is declared
>>> obsolete before it's defined and the definition itself triggers the
>>> obsolete warning.  The patch below moves it around and stops the
>>> `destructor' warning:
>>
>> Thanks for looking into to it, your patch works fine for me. Can this be
>> applied?
>
> I pushed to master [1: 9bf9463].
>
> 1: 2017-01-29 11:16:06 -0500 9bf94639b8f674d2c7894df35f26f09d0ecc67f5
>   Don't warn about obsolete defgenerics when defining them

Thanks!

Regarding eieio-object-name-string, the issue is indeed that it is first
defined via cl-defgeneric with an obsolete declaration, which in turn
means that any (uncompiled) cl-defmethod will issue an obsoletion
warning (so in this case twice: for eieio and eieio-named in
eieio-base.el).

So couldn't we just simply remove the cl-defgeneric for
eieio-object-name-string, and use make-obsolete instead?

Stefan, what do you think?

-David




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25556; Package emacs. (Fri, 16 Mar 2018 01:32:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 25556 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,
 David Engster <deng <at> randomsample.de>, npostavs <at> users.sourceforge.net
Subject: Re: bug#25556: 26.0.50.1;
 Requiring uncompiled eieio issues obsoletion warnings
Date: Thu, 15 Mar 2018 21:31:34 -0400
David Engster wrote:

> Regarding eieio-object-name-string, the issue is indeed that it is first
> defined via cl-defgeneric with an obsolete declaration, which in turn
> means that any (uncompiled) cl-defmethod will issue an obsoletion
> warning (so in this case twice: for eieio and eieio-named in
> eieio-base.el).
>
> So couldn't we just simply remove the cl-defgeneric for
> eieio-object-name-string, and use make-obsolete instead?
>
> Stefan, what do you think?



Returning to this topic:
It seems eieio-object-name-string has been de-obsoleted, but the fact
that object-print is now obsolete causes 157 identical warnings
when bootstrapping:

  eieio.el: `object-print' is an obsolete generic function (as of 26.1);
  use `cl-print-object' instead.

Minimal example:
rm lisp/emacs-lisp/eieio.elc
and byte-compile any file that requires 'eieio.

It would be great if cl-defmethod only warned when it was in the file
actually being compiled.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25556; Package emacs. (Fri, 16 Mar 2018 06:01:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 25556 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,
 David Engster <deng <at> randomsample.de>, npostavs <at> users.sourceforge.net
Subject: Re: bug#25556: 26.0.50.1;
 Requiring uncompiled eieio issues obsoletion warnings
Date: Fri, 16 Mar 2018 02:00:10 -0400
I've suppressed many of these warnings in 419514a.
BTW, these warnings don't have a "Warning:" prefix.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25556; Package emacs. (Fri, 16 Mar 2018 12:15:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 25556 <at> debbugs.gnu.org, David Engster <deng <at> randomsample.de>,
 npostavs <at> users.sourceforge.net
Subject: Re: bug#25556: 26.0.50.1;
 Requiring uncompiled eieio issues obsoletion warnings
Date: Fri, 16 Mar 2018 08:14:38 -0400
> Minimal example:
> rm lisp/emacs-lisp/eieio.elc
> and byte-compile any file that requires 'eieio.
>
> It would be great if cl-defmethod only warned when it was in the file
> actually being compiled.

Indeed that's a bug.  The warning should only be emitted if we're
compiling a call to the obsolete function or a defmethod for
that function.  Not sure where the problem is coming from.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25556; Package emacs. (Sat, 17 Mar 2018 00:43:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 25556 <at> debbugs.gnu.org, David Engster <deng <at> randomsample.de>,
 npostavs <at> users.sourceforge.net
Subject: Re: bug#25556: 26.0.50.1;
 Requiring uncompiled eieio issues obsoletion warnings
Date: Fri, 16 Mar 2018 20:42:42 -0400
BTW, looks like the same issue with "obsolete name arg".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25556; Package emacs. (Mon, 24 Aug 2020 15:27:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: David Engster <deng <at> randomsample.de>
Cc: 25556 <at> debbugs.gnu.org
Subject: Re: bug#25556: 26.0.50.1; Requiring uncompiled eieio issues
 obsoletion warnings
Date: Mon, 24 Aug 2020 17:26:11 +0200
David Engster <deng <at> randomsample.de> writes:

> I'm currently trying to fix compiler warnings during the CEDET compile
> in Emacs master, but there's one annoying problem I'm unsure how to
> fix. Whenever a file does (require 'eieio), and EIEIO is not yet
> byte-compiled, those two warnings are issued:
>
> ../../emacs-lisp/eieio.el: ‘eieio-object-name-string’ is an obsolete
> generic function (as of 25.1); use ‘eieio-named’ instead.
> ../../emacs-lisp/eieio.el: ‘destructor’ is an obsolete generic
> function (as of 26.1).
>
> Since EIEIO is compiled pretty late, one is flooded with these warnings
> when compiling Emacs master. The warnings seems to come from the
> cl-defgeneric for `eieio-object-name-string' and `destructor'. How can
> this be dealt with?

I think all of this was fixed last year, when all the obsolete eieio
function calls were rewritten, so I'm closing this bug report.  If
there's still any issues here, please respond to the debbugs address and
we'll reopen the report.

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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 24 Aug 2020 15:27:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 25556 <at> debbugs.gnu.org and David Engster <deng <at> randomsample.de> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 24 Aug 2020 15:27: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. (Tue, 22 Sep 2020 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 216 days ago.

Previous Next


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