From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: worrying about byte-compiler warnings [was: Flycheck reports are never satisfying!?] Date: Thu, 28 Aug 2014 08:51:05 -0700 (PDT) Message-ID: <8aabfda9-fe74-43ee-92c6-51bf44ffb034@default> References: <86ha0w95vp.fsf@somewhere.org> <86bnr4ya4m.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1409241108 15714 80.91.229.3 (28 Aug 2014 15:51:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Aug 2014 15:51:48 +0000 (UTC) To: Stefan Monnier , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 28 17:51:40 2014 Return-path: Envelope-to: geh-help-gnu-emacs@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 1XN1zA-00037H-KU for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Aug 2014 17:51:40 +0200 Original-Received: from localhost ([::1]:37676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN1zA-00072H-9u for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Aug 2014 11:51:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN1yr-00071W-Hm for help-gnu-emacs@gnu.org; Thu, 28 Aug 2014 11:51:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XN1yg-0000iP-PB for help-gnu-emacs@gnu.org; Thu, 28 Aug 2014 11:51:21 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:34144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN1yg-0000iK-Iu for help-gnu-emacs@gnu.org; Thu, 28 Aug 2014 11:51:10 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s7SFp7wq024871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 28 Aug 2014 15:51:09 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s7SFp6JV019587 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 28 Aug 2014 15:51:06 GMT Original-Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7SFp60r027948; Thu, 28 Aug 2014 15:51:06 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] 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: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99474 Archived-At: >> In such cases, the packages (which use "externals") will output as >> many warnings as well, for references to "undefined variables"? > > If you take a 20 year old package that hasn't been updated, then the > byte-compiler will usually emit many such warnings, yes. Though it does not make the claim that the presence of many warnings indicates that a package is out of date, someone might well misread that statement and be misled by it. So let me be clear: Byte-compiler warnings are not necessarily a sign that a package has not been updated or it has a coding problem. A package that works with multiple Emacs versions will often lead to byte-compiler warnings, possibly many of them, that do not represent real problems. And if the oldest Emacs version supported by a package does not support things like `declare-function' then there can be even more warnings, due to function arity changes over time (function-not-known-to-be-defined warnings). In general, my advice to package users would be to not worry about byte-compiler warnings. They are mainly helpful for package developers or maintainers (who should be checking them). If you are a Lisp-savvy user and you want to report a compiler warning that you think might indicate a problem then, by all means, do let the package maintainer know. But most of the time users can and typically should ignore byte-compiler warnings for 3rd-party packages, IMHO, especially for packages that claim to support multiple Emacs versions. A notable exception are undefined-variable warnings. It is trivial for a package maintainer to prevent an inappropriate undefined-variable warning, no matter how old the Emacs versions supported by the package. So if a user sees such a warning then yes, that is probably worth reporting to the package maintainer. And of course it is always OK to err on the side of caution and feel free to report anything you see to a package maintainer. My point is only that users need not _worry_ just because they might see a bunch of byte-compiler warnings.