From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "picnoir" Newsgroups: gmane.emacs.help Subject: Invalid function error when loading elisp through native compilation Date: Sun, 03 Mar 2024 11:42:14 +0100 Message-ID: <87edcr8um1.fsf@alternativebit.fr> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30779"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 03 17:06:49 2024 Return-path: Envelope-to: geh-help-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 1rgoMS-0007ml-KW for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 03 Mar 2024 17:06:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgoLt-0006DX-7U; Sun, 03 Mar 2024 11:06:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgjIU-0000n4-Qj for help-gnu-emacs@gnu.org; Sun, 03 Mar 2024 05:42:22 -0500 Original-Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgjIS-0008AY-Mx for help-gnu-emacs@gnu.org; Sun, 03 Mar 2024 05:42:22 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 4F7A8E0003 for ; Sun, 3 Mar 2024 10:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alternativebit.fr; s=gm1; t=1709462535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=q39n3+d113SO03NIry/TLx/NUDhPvwGxwNZLCys4q0g=; b=kv6c/2j5l9svAQhA1Kje5GBYEtXMbgcwn6sQF0vwqx1QxzprQFBdym5inV8dD/lxin+KtP /gVqpFskVp9V4aDkL3qPagJx8VnHmDKtkRBJ3+iBYFLZXO54KWXAkV8v9t8YsPAFA+evrI ndPfAoIV8xD/KTkRhExzzx9VAnIJfHU6jeWT5RzBmfXW23UZPrZRvJ8CytYw4PSjgRGHBh VGsEq58aOSIUwd6gLnbaYcS+qh9G/cm23Fx0VG2nyplgmatQ3Mr0dfHI974oDmd2NS5sh0 bN/LsTKHq1LUZF98ED+5erdcS+gfjhJigBYwy+N/4ORY1+i+FTS6OLVpmLoOPA== X-GND-Sasl: felix@alternativebit.fr Received-SPF: pass client-ip=2001:4b98:dc4:8::224; envelope-from=picnoir@alternativebit.fr; helo=relay4-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 03 Mar 2024 11:06:11 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146026 Archived-At: 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?