GNU bug report logs - #52105
comp-tests.el causes byte-compiler warnings

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Stephen Gildea <stepheng+emacs@HIDDEN>; Keywords: patch; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 29.1, send any further explanations to 52105 <at> debbugs.gnu.org and Stephen Gildea <stepheng+emacs@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 52105 <at> debbugs.gnu.org:


Received: (at 52105) by debbugs.gnu.org; 29 Nov 2021 16:05:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 29 11:05:23 2021
Received: from localhost ([127.0.0.1]:39081 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mrj9e-0005r5-RK
	for submit <at> debbugs.gnu.org; Mon, 29 Nov 2021 11:05:23 -0500
Received: from quimby.gnus.org ([95.216.78.240]:59776)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mrj9X-0005qN-5M
 for 52105 <at> debbugs.gnu.org; Mon, 29 Nov 2021 11:05:18 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=9qUrFOdDu/qdVWEU5HSMKc3uNDlFH6zU6rj1JA62atk=; b=pB5yumEMxX35M62uZ2cWBfRD+o
 Oah3KwMuHq/+c4isZShksKUx7Y61FB1aN0UCzjSIMAftsKdSnx1yB2tEG6SbXc0KceSCdPzX66Vw8
 ACbUDZwdOu2GKrHiK67lVGGfhUEDDI/jyErVoiPp1lBIwZVCk5iCxR2edYaC2AteD45Q=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mrj9J-0005yX-4S; Mon, 29 Nov 2021 17:05:03 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#52105: comp-tests.el causes byte-compiler warnings
References: <3377181.1637849415@pental> <xjf7dcw2mus.fsf@HIDDEN>
 <83o8683xmf.fsf@HIDDEN>
X-Now-Playing: Mia Doi Todd's _Music Life_: "Wainiha Valley (feat. Laraaji)"
Date: Mon, 29 Nov 2021 17:04:59 +0100
In-Reply-To: <83o8683xmf.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 25 Nov
 2021 20:20:56 +0200")
Message-ID: <87wnkrt0b8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Eli Zaretskii <eliz@HIDDEN> writes: > I see no reason to
 install this on the release branch. Master is > good enough, IMO. And it seems
 like the patch was pushed, but the bug report was left open, so I'm closing
 it now. Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 52105
Cc: stepheng+emacs@HIDDEN, 52105 <at> debbugs.gnu.org,
 Andrea Corallo <akrl@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

> I see no reason to install this on the release branch.  Master is
> good enough, IMO.

And it seems like the patch was pushed, but the bug report was left
open, so I'm closing it now.

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#52105; Package emacs. Full text available.

Message received at 52105 <at> debbugs.gnu.org:


Received: (at 52105) by debbugs.gnu.org; 25 Nov 2021 18:21:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 25 13:21:03 2021
Received: from localhost ([127.0.0.1]:57995 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mqJMl-0001oV-Hf
	for submit <at> debbugs.gnu.org; Thu, 25 Nov 2021 13:21:03 -0500
Received: from eggs.gnu.org ([209.51.188.92]:60714)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mqJMh-0001ng-4i
 for 52105 <at> debbugs.gnu.org; Thu, 25 Nov 2021 13:21:03 -0500
Received: from [2001:470:142:3::e] (port=53540 helo=fencepost.gnu.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mqJMb-00024D-Tn; Thu, 25 Nov 2021 13:20:53 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=VUAlYiDVfXvKjcJrwJFIRXnauCUd5kWLR8Xk0ZsVA4A=; b=VCnloXuXX5Me
 78dEJfXn0ToZaB/6JiEKxFSTcHSg7vze4yYyAsPL9zCLrdVbdR6mF9bWz5xnVABh7pfejFjBS6g/I
 B6BZQRPVfmLpVChJnp3xIxEy7fjZd3JO2Okyv6Jtn1RkenmrdFi/lBoU2dNeTVEByLhnkUFoYD0P9
 r6/UtagKF1JZnTZz9DY9oK2g6yR/jx7VoHkLW9F8jL+96iQ48gYF5dl6UBs/YeCVEwlL78TdmhoPS
 hq5DstNGlxeHpdGNbrDjxOgzG4qkw40aQ/c1PNPX8+0OzHvptbUrk76T7D8/fMyokXkptOkSEmNS3
 sKBozwH7tDSxFnc3jyEfzQ==;
Received: from [87.69.77.57] (port=1159 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mqJMb-00066C-Jv; Thu, 25 Nov 2021 13:20:53 -0500
Date: Thu, 25 Nov 2021 20:20:56 +0200
Message-Id: <83o8683xmf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andrea Corallo <akrl@HIDDEN>
In-Reply-To: <xjf7dcw2mus.fsf@HIDDEN> (message from Andrea Corallo on Thu, 
 25 Nov 2021 16:58:51 +0000)
Subject: Re: bug#52105: comp-tests.el causes byte-compiler warnings
References: <3377181.1637849415@pental> <xjf7dcw2mus.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 52105
Cc: 52105 <at> debbugs.gnu.org, stepheng+emacs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Andrea Corallo <akrl@HIDDEN>
> Date: Thu, 25 Nov 2021 16:58:51 +0000
> Cc: 52105 <at> debbugs.gnu.org
> 
> > The following small patch eliminates all the compile-time warnings
> > from comp-tests.el.
> >
> > This patch is against the master branch, but since the patch changes only
> > test/, perhaps you would like me to re-work it for the emacs-28 branch.
> 
> Hi Stephen,
> 
> thanks for the patch, LGTM.
> 
> For the emacs-28 subject I let Eli or Lars speak.

I see no reason to install this on the release branch.  Master is
good enough, IMO.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#52105; Package emacs. Full text available.

Message received at 52105 <at> debbugs.gnu.org:


Received: (at 52105) by debbugs.gnu.org; 25 Nov 2021 16:58:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 25 11:58:57 2021
Received: from localhost ([127.0.0.1]:57970 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mqI5I-0008Lb-Qg
	for submit <at> debbugs.gnu.org; Thu, 25 Nov 2021 11:58:56 -0500
Received: from mx.sdf.org ([205.166.94.24]:55727)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <akrl@HIDDEN>) id 1mqI5G-0008LP-G2
 for 52105 <at> debbugs.gnu.org; Thu, 25 Nov 2021 11:58:55 -0500
Received: from ma.sdf.org (ma.sdf.org [205.166.94.33])
 by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 1APGwp7H017766
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO);
 Thu, 25 Nov 2021 16:58:51 GMT
From: Andrea Corallo <akrl@HIDDEN>
To: Stephen Gildea <stepheng+emacs@HIDDEN>
Subject: Re: bug#52105: comp-tests.el causes byte-compiler warnings
References: <3377181.1637849415@pental>
Date: Thu, 25 Nov 2021 16:58:51 +0000
In-Reply-To: <3377181.1637849415@pental> (Stephen Gildea's message of "Thu, 25
 Nov 2021 06:10:15 -0800")
Message-ID: <xjf7dcw2mus.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 52105
Cc: 52105 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stephen Gildea <stepheng+emacs@HIDDEN> writes:

> Package: emacs
> Version: 28.0.60
> Tags: patch
>
> The following small patch eliminates all the compile-time warnings
> from comp-tests.el.
>
> This patch is against the master branch, but since the patch changes only
> test/, perhaps you would like me to re-work it for the emacs-28 branch.

Hi Stephen,

thanks for the patch, LGTM.

For the emacs-28 subject I let Eli or Lars speak.

Regards

  Andrea





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#52105; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Nov 2021 14:10:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 25 09:10:27 2021
Received: from localhost ([127.0.0.1]:56222 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mqFSC-0004qJ-Fe
	for submit <at> debbugs.gnu.org; Thu, 25 Nov 2021 09:10:26 -0500
Received: from tigger.sg.gildea.net ([99.65.78.170]:37988
 helo=pental.sg.gildea.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stepheng+emacs@HIDDEN>) id 1mqFSA-0004or-69
 for submit <at> debbugs.gnu.org; Thu, 25 Nov 2021 09:10:23 -0500
Received: from pental (localhost [127.0.0.1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (Client did not present a certificate)
 by pental.sg.gildea.net (Postfix) with ESMTPS id B627811DBA7A
 for <submit <at> debbugs.gnu.org>; Thu, 25 Nov 2021 06:10:15 -0800 (PST)
From: Stephen Gildea <stepheng+emacs@HIDDEN>
To: submit <at> debbugs.gnu.org
Subject: comp-tests.el causes byte-compiler warnings
X-Mailer: MH-E 8.6+git; nmh 1.7.1; Emacs 29.0.50
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Date: Thu, 25 Nov 2021 06:10:15 -0800
Message-ID: <3377181.1637849415@pental>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

Package: emacs
Version: 28.0.60
Tags: patch

The following small patch eliminates all the compile-time warnings
from comp-tests.el.

This patch is against the master branch, but since the patch changes only
test/, perhaps you would like me to re-work it for the emacs-28 branch.



--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=comp-tests-eliminate-compiler-warnings.patch
Content-Description: remove compiler warnings from comp-tests.el

diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index 025bc2058e..16612965bd 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -27,14 +27,23 @@
 
 (require 'ert)
 (require 'ert-x)
-(require 'cl-lib)
-
-(defconst comp-test-src (ert-resource-file "comp-test-funcs.el"))
-
-(defconst comp-test-dyn-src (ert-resource-file "comp-test-funcs-dyn.el"))
-
-(when (featurep 'native-compile)
+(eval-when-compile
+  (require 'cl-lib)
   (require 'comp)
+  (defconst comp-test-src (ert-resource-file "comp-test-funcs.el"))
+  (defconst comp-test-dyn-src (ert-resource-file "comp-test-funcs-dyn.el"))
+  (defconst comp-test-pure-src (ert-resource-file "comp-test-pure.el"))
+  (defconst comp-test-45603-src (ert-resource-file "comp-test-45603.el")))
+(eval-and-compile
+  (require 'comp-cstr)          ;in eval-and-compile for its defstruct
+  ;; Load the test code here so the compiler can check the function
+  ;; names used in this file.
+  (load comp-test-src nil t)
+  (load comp-test-dyn-src nil t)
+  (load comp-test-pure-src nil t)
+  (load comp-test-45603-src nil t))
+
+(when (native-comp-available-p)
   (message "Compiling tests...")
   (load (native-compile comp-test-src))
   (load (native-compile comp-test-dyn-src)))
@@ -352,6 +361,8 @@ interactive-form
                                  comp-test-interactive-form2-f)))
   (should-not (commandp #'comp-tests-doc-f)))
 
+(declare-function comp-tests-free-fun-f nil)
+
 (comp-deftest free-fun ()
   "Check we are able to compile a single function."
   (eval '(defun comp-tests-free-fun-f ()
@@ -369,6 +380,8 @@ free-fun
   (should (equal (interactive-form #'comp-tests-free-fun-f)
                  '(interactive))))
 
+(declare-function comp-tests/free\fun-f nil)
+
 (comp-deftest free-fun-silly-name ()
   "Check we are able to compile a single function."
   (eval '(defun comp-tests/free\fun-f ()) t)
@@ -493,7 +506,7 @@ 45635-1
 
 (comp-deftest 45603-1 ()
   "<https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-12/msg01994.html>"
-  (load (native-compile (ert-resource-file "comp-test-45603.el")))
+  (load (native-compile comp-test-45603-src))
   (should (fboundp #'comp-test-45603--file-local-name)))
 
 (comp-deftest 46670-1 ()
@@ -786,6 +799,8 @@ comp-tests-tco-checker
            (comp-tests-mentioned-p (comp-c-func-name 'comp-tests-tco-f "F" t)
                                    insn)))))))
 
+(declare-function comp-tests-tco-f nil)
+
 (comp-deftest tco ()
   "Check for tail recursion elimination."
   (let ((native-comp-speed 3)
@@ -814,6 +829,8 @@ comp-tests-fw-prop-checker-1
        (or (comp-tests-mentioned-p 'concat insn)
            (comp-tests-mentioned-p 'length insn)))))))
 
+(declare-function comp-tests-fw-prop-1-f nil)
+
 (comp-deftest fw-prop-1 ()
   "Some tests for forward propagation."
   (let ((native-comp-speed 2)
@@ -1404,7 +1421,7 @@ pure
   (let ((native-comp-speed 3)
         (comp-post-pass-hooks '((comp-final comp-tests-pure-checker-1
                                             comp-tests-pure-checker-2))))
-    (load (native-compile (ert-resource-file "comp-test-pure.el")))
+    (load (native-compile comp-test-pure-src))
 
     (should (subr-native-elisp-p (symbol-function #'comp-tests-pure-caller-f)))
     (should (= (comp-tests-pure-caller-f) 4))

--=-=-=--




Acknowledgement sent to Stephen Gildea <stepheng+emacs@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#52105; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 29 Nov 2021 16:15:02 UTC

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