all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stephen Gildea <stepheng+emacs@gildea.com>
Cc: 50975@debbugs.gnu.org
Subject: bug#50975: 28.0.60; mh-utils-tests fail with native compilation
Date: Tue, 05 Oct 2021 07:54:41 +0000	[thread overview]
Message-ID: <xjf7derdhz2.fsf@ma.sdf.org> (raw)
In-Reply-To: <540302.1633393742@pental> (Stephen Gildea's message of "Mon, 04 Oct 2021 17:29:02 -0700")

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.

> 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.

If we find it useful we could add a knob to disable all trampoline
generation for special cases like this.

Best Regards

  Andrea






  reply	other threads:[~2021-10-05  7:54 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 [this message]
2021-10-05 12:31     ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xjf7derdhz2.fsf@ma.sdf.org \
    --to=bug-gnu-emacs@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.