From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: sea-level rise of byte-compilation warnings [was: Fixing...byte-compilation warnings...] Date: Mon, 16 Nov 2015 15:52:17 -0800 (PST) Message-ID: <2f908b2b-7e0c-462e-bfe8-75dff515b3b7@default> References: <5645F670.9040601@online.de> <56460E2B.10603@cs.ucla.edu> <87io54c0es.fsf@web.de> <87y4dxy096.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1447722423 2987 80.91.229.3 (17 Nov 2015 01:07:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Nov 2015 01:07:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Artur Malabarba Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 17 02:06:48 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZyUiz-00013Z-99 for ged-emacs-devel@m.gmane.org; Tue, 17 Nov 2015 02:06:21 +0100 Original-Received: from localhost ([::1]:54040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyUiy-0001tE-S0 for ged-emacs-devel@m.gmane.org; Mon, 16 Nov 2015 20:06:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyTZR-00087X-Fd for emacs-devel@gnu.org; Mon, 16 Nov 2015 18:52:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyTZN-0003t3-Ag for emacs-devel@gnu.org; Mon, 16 Nov 2015 18:52:25 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:17488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyTZN-0003sp-46 for emacs-devel@gnu.org; Mon, 16 Nov 2015 18:52:21 -0500 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id tAGNqJog012760 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 16 Nov 2015 23:52:19 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id tAGNqIKG029374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 16 Nov 2015 23:52:19 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id tAGNqIk5017415; Mon, 16 Nov 2015 23:52:18 GMT In-Reply-To: <87y4dxy096.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:194610 Archived-At: > In my experience, 90% of the superfluous warnings are silenced by a > `defvar' or a `declare-function'. Finally, with-no-warnings should cover > the last 10. If this isn't well documented it really should be. Those are not supported in all Emacs versions. That is the reason I don't use them in some libraries. > > The degree of warning is now overkill in many contexts > > (even for novices, it could be argued). >=20 > I don't usually feel overwhelmed by the warnings. Most of my elisp files > have 0 to 3 of these warning-suppressing forms. Only the really large > projects with 10+ files end up having a lot. Different users will get different floods of warnings. The older the Emacs versions your libraries support, the deeper the flood, other things being equal. The warnings don't really bother me. What bothers me somewhat are the fact that they bother users of my libraries. I need to let them know that there is no problem. > I'm curious what are your contexts. I guess you're supporting Emacs > versions < 24.1? I am, for many of my libraries, but not for all. If a new library makes use of constructs from Emacs N then I generally support only N and greater. > > What is needed is to: > > > > * be able to notice the important ones, while also > > showing ones that are less important >=20 > Different warning levels might be nice, but (looking at > `byte-compile-warnings') the only warnings that don't immediately mean > =E2=80=9Cthis code might break=E2=80=9D are the `cl-functions', `obsolete= ', and > `mapcar'. So I don't know how much it would help your warning flood. `obsolete' certainly does. I continue to (and will continue to) use "obsolete" constructs. But the topic is not about me or my use. It's a general topic. > > * be able to have the code itself easily (and > > conditionally) inhibit them - as a whole or by type >=20 > Like I said, with-no-warnings inhibits them locally, but I perfectly > agree there should be a way to suppress warnings on a file-local (and > maybe dir-local) basis. (FWIW, `with-no-warnings' is not available in Emacs 20. Lots of my code works also in Emacs 20, intentionally.) > > FWIW, my crystal ball whispers that just analyzing > > the code for sexps that are protected by `fboundp' > > might go a long way toward eliminating many spurious > > warnings. >=20 > My psychic senses agree.