From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Serghei Iakovlev Newsgroups: gmane.emacs.devel Subject: Re: esup byte compile warnings Date: Wed, 29 Jan 2020 12:56:40 +0000 Message-ID: <104542A5-436D-44DB-AEE2-9DB5D64FAC01@protonmail.ch> References: <15aa1d01-dcff-34c0-0232-141edf1b3739@protonmail.ch> Reply-To: Serghei Iakovlev Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="99260"; mail-complaints-to="usenet@ciao.gmane.io" Cc: GNU Emacs Developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 29 13:57:28 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iwmuO-000Pn0-U4 for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Jan 2020 13:57:28 +0100 Original-Received: from localhost ([::1]:45990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwmuO-0005Th-0C for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Jan 2020 07:57:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41605) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwmtn-0004bs-D9 for emacs-devel@gnu.org; Wed, 29 Jan 2020 07:56:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwmtl-0002rf-Rd for emacs-devel@gnu.org; Wed, 29 Jan 2020 07:56:51 -0500 Original-Received: from mail-40134.protonmail.ch ([185.70.40.134]:20655) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iwmtl-0002oo-AH for emacs-devel@gnu.org; Wed, 29 Jan 2020 07:56:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.ch; s=default; t=1580302606; bh=PjvtqPyqejV1cnQ5G796eYYwVJwfUv1lvYCdFriYEls=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=u0I6dakYKhQCNzJYuqAnQLxbi/0k9TOL065V55iEkr7E1LWVlcTHzkpmuxVnsJ1Z2 cd44jWSd+3UjxI13IqKU/zd6h/3v9+hJlohcIgDTsNQ9oEtNF/5T3r2TI/kwgTU5h3 2Q+Y8sHbDVpQYQIrXjVl4lpix6Qg0ygsZJ2J5+qc= In-Reply-To: Feedback-ID: _R8KJzte5sz8SQWHcnDN91Kshyr4gZBHh1d2Efk8ItHfFJEyfsSrvYKxlFgM-K6SqCAHswKFjJZAghkXSedbVg==:Ext:ProtonMail X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.70.40.134 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:244747 Archived-At: I've replaced all the =E2=80=98oref=E2=80=99 with =E2=80=98slot-value= =E2=80=99 and properly used quotes for the slot names. Thus, I've replaced (oref x :y) by (slot-value x 'y) This seems is works, but still there are some warnings remaining. For example: In esup-total-exec-time: esup.el:166:52: Warning: Unknown slot =E2=80=98exec-time=E2=80=99 In esup-total-gc-number: esup.el:172:52: Warning: Unknown slot =E2=80=98gc-number=E2=80=99 In esup-total-gc-time: esup.el:178:50: Warning: Unknown slot =E2=80=98gc-time=E2=80=99 In esup-drop-insignificant-times: esup.el:186:39: Warning: Unknown slot =E2=80=98exec-time=E2=80=99 esup.el:530:25: Warning: Unknown slot =E2=80=98file=E2=80=99 esup.el:538:9: Warning: Unknown slot =E2=80=98start-point=E2=80=99 esup.el:545:30: Warning: Unknown slot =E2=80=98line-number=E2=80=99 esup.el:548:30: Warning: Unknown slot =E2=80=98exec-time=E2=80=99 esup.el:546:30: Warning: Unknown slot =E2=80=98percentage=E2=80=99 esup.el:549:30: Warning: Unknown slot =E2=80=98expression-string=E2=80= =99 In esup-fontify-results: esup.el:560:15: Warning: Unknown slot =E2=80=98expression-string=E2=80= =99 Consider the following defun: (defun esup-total-exec-time (results) "Calculate the total execution time of RESULTS." (cl-loop for result in results sum (slot-value result 'exec-time) into total-exec-time finally return total-exec-time)) This produces a waring: In esup-total-exec-time: esup.el:166:52: Warning: Unknown slot =E2=80=98exec-time=E2=80=99 Looks like the reason is that the byte-compiler unable to match =E2=80=98result=E2=80=99 with the class declaration. I found similar [1] issues [2], but I'm still not pretty sure the proper way to fix these warnings. [1]: https://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00678.html [2]: https://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00880.html > On 24 Jan 2020, at 23:55, Stefan Monnier wrote= : >=20 >=20 >> There are `esup' [1] byte compile warnings I would like avoid to. >> Some of them seems trivial to me. However, I don't quite understand >> slots related warnings. >=20 > The the slots, usually it's just that code that uses EIEIO seems to > misuse a weird feature of EIEIO, so they use the initval keyword instead > of the slot name when accessing the slot. For example, often code will > do >=20 > (slot-value x :file) >=20 > where the slot's name is not `:file` but `file`, so the correct usage is >=20 > (slot-value x 'file) >=20 > This odd usage does work for historical reasons but is deprecated, hence > the warning. >=20 >=20 > Stefan >=20 >=20