unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "picnoir" <picnoir@alternativebit.fr>
To: help-gnu-emacs@gnu.org
Subject: Invalid function error when loading elisp through native compilation
Date: Sun, 03 Mar 2024 11:42:14 +0100	[thread overview]
Message-ID: <87edcr8um1.fsf@alternativebit.fr> (raw)

Hi,

I'm facing a puzzling error that only manifests using native
compilation.

If I evaluate this particular elisp file:
https://github.com/picnoir/my-repo-pins/blob/master/my-repo-pins.el
using eval-buffer (ie. not natively compiled), I can run the following
snippet just fine:

  (my-repo-pins--clone-project "test/test")

However, if I natively compile the same elisp file and load it to Emacs
through emacs-lisp-native-compile-and-load and try to call
my-repo-pins--clone-project the exact same way I was doing above, the
function call errors out with a confusing error message:

  Invalid function: (my-repo-pins--query-github-owner-repo "test" "test"
  (lambda (result) (let ((new-state (if (null result) 'not-found
  result))) (my-repo-pins--update-forges-state "GitHub.com" new-state
  "test/test"))))

I'm not sure how to debug that further. What should I do to find out
what the issue is here? Any idea about what's happening?



             reply	other threads:[~2024-03-03 10:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-03 10:42 picnoir [this message]
2024-03-03 21:56 ` Invalid function error when loading elisp through native compilation Michael Heerdegen via Users list for the GNU Emacs text editor
2024-03-03 23:27   ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-03-04  0:50     ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-03-04  1:07       ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-03-04  1:56     ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-03-03 21:58 ` tpeplt
2024-03-04  1:22   ` tpeplt
2024-03-04  1:43     ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-03-04  2:01       ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-03-04  3:53         ` [External] : " Drew Adams

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=87edcr8um1.fsf@alternativebit.fr \
    --to=picnoir@alternativebit.fr \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).