From: Eli Zaretskii <eliz@gnu.org>
To: Andrea Corallo <akrl@sdf.org>
Cc: 50975@debbugs.gnu.org, stepheng+emacs@gildea.com
Subject: bug#50975: 28.0.60; mh-utils-tests fail with native compilation
Date: Tue, 05 Oct 2021 15:31:13 +0300 [thread overview]
Message-ID: <83k0ir4pri.fsf@gnu.org> (raw)
In-Reply-To: <xjf7derdhz2.fsf@ma.sdf.org> (bug-gnu-emacs@gnu.org)
> 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" <bug-gnu-emacs@gnu.org>
>
> Stephen Gildea <stepheng+emacs@gildea.com> 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.
prev parent reply other threads:[~2021-10-05 12:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-02 18:49 bug#50975: 28.0.60; mh-utils-tests fail with native compilation Ken Brown
2021-10-02 19:11 ` Eli Zaretskii
2021-10-04 13:59 ` Robert Pluim
2021-10-04 14:07 ` Lars Ingebrigtsen
2021-10-04 14:24 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-04 20:57 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-04 22:32 ` Ken Brown
2021-10-05 0:29 ` Stephen Gildea
2021-10-05 7:54 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-05 12:31 ` Eli Zaretskii [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83k0ir4pri.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=50975@debbugs.gnu.org \
--cc=akrl@sdf.org \
--cc=stepheng+emacs@gildea.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).