From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50975: 28.0.60; mh-utils-tests fail with native compilation Date: Tue, 05 Oct 2021 15:31:13 +0300 Message-ID: <83k0ir4pri.fsf@gnu.org> References: <9fd40a2f-c653-60b7-7f59-09c925122bf5@cornell.edu> <540302.1633393742@pental> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29339"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50975@debbugs.gnu.org, stepheng+emacs@gildea.com To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 05 14:35:38 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mXjfO-00070g-Li for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Oct 2021 14:35:30 +0200 Original-Received: from localhost ([::1]:34180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXjfN-0003Ii-A0 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Oct 2021 08:35:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXjc2-0001Bu-3q for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 08:32:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXjc1-0007Ox-Rv for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 08:32:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mXjc1-0006qJ-Ox for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 08:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Oct 2021 12:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50975 X-GNU-PR-Package: emacs Original-Received: via spool by 50975-submit@debbugs.gnu.org id=B50975.163343709226258 (code B ref 50975); Tue, 05 Oct 2021 12:32:01 +0000 Original-Received: (at 50975) by debbugs.gnu.org; 5 Oct 2021 12:31:32 +0000 Original-Received: from localhost ([127.0.0.1]:39251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXjbX-0006pS-LL for submit@debbugs.gnu.org; Tue, 05 Oct 2021 08:31:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXjbV-0006p7-C8 for 50975@debbugs.gnu.org; Tue, 05 Oct 2021 08:31:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36008) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXjbN-0007Gh-Rv; Tue, 05 Oct 2021 08:31:21 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1083 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXjbN-0001n5-Ey; Tue, 05 Oct 2021 08:31:21 -0400 In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216440 Archived-At: > Cc: 50975@debbugs.gnu.org > Date: Tue, 05 Oct 2021 07:54:41 +0000 > From: Andrea Corallo via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Stephen Gildea writes: > > > Thank you, Andrea, for the native-trampolines patch to mh-utils-tests.el. > > In this patch, the test explicitly compiles trampolines before redefining > > two functions that are defined in C. > > > > Is it necessary to provide trampolines at all for these short-lived test > > functions? The following works for me: > > > > (mapc (lambda (x) (add-to-list 'native-comp-never-optimize-functions x)) > > '(call-process file-directory-p)) > > Yes disabling the trampoline generation is another option. We should document these caveats and the solutions for them in the ERT manual. > > Before redefining the functions, the test could create a dynamic local > > binding for native-comp-never-optimize-functions and add to it as above. > > > > If that is a reasonable approach, can we go further? Can the > > native-compile code detect that this is a test and automatically > > suppress trying to compile a trampoline, without the test having > > to be aware of native-compile? > > I don't think so. The Emacs implementation has the right to use > `call-process' to function and in general I think we really want to test > the full implementation including trampolines as much as possible in all > running tests we can. I agree. I don't think native-compilation should second-guess what the programmer wants to do, because it's quite possible that some test will want not to have a trampoline, for valid reasons.