* bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
@ 2017-01-27 20:38 David Engster
2017-01-28 7:15 ` Eli Zaretskii
2020-08-24 15:26 ` Lars Ingebrigtsen
0 siblings, 2 replies; 12+ messages in thread
From: David Engster @ 2017-01-27 20:38 UTC (permalink / raw)
To: 25556
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
2017-01-27 20:38 bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings David Engster
@ 2017-01-28 7:15 ` Eli Zaretskii
2017-01-28 8:39 ` David Engster
2020-08-24 15:26 ` Lars Ingebrigtsen
1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2017-01-28 7:15 UTC (permalink / raw)
To: David Engster; +Cc: 25556
> From: David Engster <deng@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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
2017-01-28 7:15 ` Eli Zaretskii
@ 2017-01-28 8:39 ` David Engster
2017-01-28 14:31 ` npostavs
0 siblings, 1 reply; 12+ messages in thread
From: David Engster @ 2017-01-28 8:39 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 25556
Eli Zaretskii writes:
>> From: David Engster <deng@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
2017-01-28 8:39 ` David Engster
@ 2017-01-28 14:31 ` npostavs
2017-01-28 21:15 ` David Engster
0 siblings, 1 reply; 12+ messages in thread
From: npostavs @ 2017-01-28 14:31 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 25556
David Engster <deng@randomsample.de> writes:
> Eli Zaretskii writes:
>>> From: David Engster <deng@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)
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
2017-01-28 14:31 ` npostavs
@ 2017-01-28 21:15 ` David Engster
2017-01-29 16:20 ` npostavs
0 siblings, 1 reply; 12+ messages in thread
From: David Engster @ 2017-01-28 21:15 UTC (permalink / raw)
To: npostavs; +Cc: 25556
'npostavs' writes:
> David Engster <deng@randomsample.de> writes:
>
>> Eli Zaretskii writes:
>>>> From: David Engster <deng@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
2017-01-28 21:15 ` David Engster
@ 2017-01-29 16:20 ` npostavs
2017-01-29 21:23 ` David Engster
0 siblings, 1 reply; 12+ messages in thread
From: npostavs @ 2017-01-29 16:20 UTC (permalink / raw)
To: 25556
David Engster <deng@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
2017-01-29 16:20 ` npostavs
@ 2017-01-29 21:23 ` David Engster
2018-03-16 1:31 ` Glenn Morris
0 siblings, 1 reply; 12+ messages in thread
From: David Engster @ 2017-01-29 21:23 UTC (permalink / raw)
To: npostavs; +Cc: 25556, Stefan Monnier
'npostavs' writes:
> David Engster <deng@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
2017-01-29 21:23 ` David Engster
@ 2018-03-16 1:31 ` Glenn Morris
2018-03-16 6:00 ` Glenn Morris
2018-03-16 12:14 ` Stefan Monnier
0 siblings, 2 replies; 12+ messages in thread
From: Glenn Morris @ 2018-03-16 1:31 UTC (permalink / raw)
To: 25556; +Cc: Stefan Monnier, David Engster, npostavs
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
2018-03-16 1:31 ` Glenn Morris
@ 2018-03-16 6:00 ` Glenn Morris
2018-03-16 12:14 ` Stefan Monnier
1 sibling, 0 replies; 12+ messages in thread
From: Glenn Morris @ 2018-03-16 6:00 UTC (permalink / raw)
To: 25556; +Cc: Stefan Monnier, David Engster, npostavs
I've suppressed many of these warnings in 419514a.
BTW, these warnings don't have a "Warning:" prefix.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
2018-03-16 1:31 ` Glenn Morris
2018-03-16 6:00 ` Glenn Morris
@ 2018-03-16 12:14 ` Stefan Monnier
2018-03-17 0:42 ` Glenn Morris
1 sibling, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2018-03-16 12:14 UTC (permalink / raw)
To: Glenn Morris; +Cc: 25556, David Engster, npostavs
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
2018-03-16 12:14 ` Stefan Monnier
@ 2018-03-17 0:42 ` Glenn Morris
0 siblings, 0 replies; 12+ messages in thread
From: Glenn Morris @ 2018-03-17 0:42 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 25556, David Engster, npostavs
BTW, looks like the same issue with "obsolete name arg".
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings
2017-01-27 20:38 bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings David Engster
2017-01-28 7:15 ` Eli Zaretskii
@ 2020-08-24 15:26 ` Lars Ingebrigtsen
1 sibling, 0 replies; 12+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-24 15:26 UTC (permalink / raw)
To: David Engster; +Cc: 25556
David Engster <deng@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
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-08-24 15:26 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-27 20:38 bug#25556: 26.0.50.1; Requiring uncompiled eieio issues obsoletion warnings David Engster
2017-01-28 7:15 ` Eli Zaretskii
2017-01-28 8:39 ` David Engster
2017-01-28 14:31 ` npostavs
2017-01-28 21:15 ` David Engster
2017-01-29 16:20 ` npostavs
2017-01-29 21:23 ` David Engster
2018-03-16 1:31 ` Glenn Morris
2018-03-16 6:00 ` Glenn Morris
2018-03-16 12:14 ` Stefan Monnier
2018-03-17 0:42 ` Glenn Morris
2020-08-24 15:26 ` 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).