From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tpeplt Newsgroups: gmane.emacs.help Subject: Re: Invalid function error when loading elisp through native compilation Date: Sun, 03 Mar 2024 20:22:43 -0500 Message-ID: <87h6hm23ks.fsf@gmail.com> References: <87edcr8um1.fsf@alternativebit.fr> <87le6z0ygt.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36201"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: "picnoir" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 04 02:23:30 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 1rgx3C-0009Ch-0T for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 04 Mar 2024 02:23:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgx2X-0008V9-KJ; Sun, 03 Mar 2024 20:22:49 -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 1rgx2V-0008Uf-Fb for help-gnu-emacs@gnu.org; Sun, 03 Mar 2024 20:22:47 -0500 Original-Received: from mail-ua1-x92b.google.com ([2607:f8b0:4864:20::92b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rgx2T-0001KF-Rh for help-gnu-emacs@gnu.org; Sun, 03 Mar 2024 20:22:47 -0500 Original-Received: by mail-ua1-x92b.google.com with SMTP id a1e0cc1a2514c-7d995bd557eso2561152241.0 for ; Sun, 03 Mar 2024 17:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709515365; x=1710120165; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MtnKYNL0oLyqzG00V/iqRfrhOkqYcv5Ix6ZL+THCdEA=; b=MqdF5Fm7U9oFJGbV+fzfI8Z2WHIU6sYRkgzmrvMppliJIXuydRFWHKy/hfoDx7oUR0 +QY5GcIIyg7kQRsg6I/6SnmXW3YJPl0glnMlvw8b6K9g2BbcR3N4TLpT950/1M9qbRGY ZmkpB4IpkHLKvCKJhRHLY4LCO/yB6pzdrqSfwoJGXQE8FF3l1Fyr4Grd9Ftn6uxoRu2J gF+nrMtSJVACsx0sHoygy9T4442tuVS6YXYGXJHGX0Uj5ijyFqmV8XguQZpKYmDBhlf1 3tGQnWZTcpzcsTTSz2EjM3JJ6mcGsD84gBhc5Qslh7c1bQ+G36arHrwOQza7lowpt05y fg6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709515365; x=1710120165; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=MtnKYNL0oLyqzG00V/iqRfrhOkqYcv5Ix6ZL+THCdEA=; b=MocAcIg/VbFXtEmQvcZZmVjov+5a99hLr9ZLfQwRe3iSLj5t6/Vt30rr4goI5hcmiY 2bTfZQLvfK2GUvtKXH585B5G60H80to5J+8fpw9hUJPugEFISP7Kc761vEeT04wf5kaA 2GvN0BVLi7zc7SgrJxhf0kgCi+DX65d/gjgUDk+B97CBECTTFYvUIvLlmmD9RhqvDNOb sewTuvLTyShtGHcvolv8KUqQ96AydCYd9wt1yLAWd4YOnWV5ZwVwA+FHmELarCjyoiSO UZD7LFpoH+CS4UvDh1jqphdDMdXfLWSpHWOf90MidQG9vyUKB8w5kjRvqxw3NDuP7G4h 79KQ== X-Gm-Message-State: AOJu0Ywvt7j1NVLqwakK/flAnvyHj7pKip8381ok0VyW/wez8tuTkriV 4jVsfr4/6RD9FYeq2YtnY0SYDbPMkgRbpfTTXaC8aVnxdZHjJAlcnJWrdp19tXw= X-Google-Smtp-Source: AGHT+IFGqx/RiuykDr/cpf03RcZV4Y7/1DsR8Kwdfrvko71pkmK8bFovmxlLS1CTrFgpvjYKujrYnA== X-Received: by 2002:a05:6102:2261:b0:470:3eff:e755 with SMTP id v1-20020a056102226100b004703effe755mr4681243vsd.24.1709515364729; Sun, 03 Mar 2024 17:22:44 -0800 (PST) Original-Received: from t530.local ([2600:8806:a821:2b00::9361]) by smtp.gmail.com with ESMTPSA id q2-20020a05622a030200b0042eeea4124csm749033qtw.36.2024.03.03.17.22.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 17:22:44 -0800 (PST) In-Reply-To: <87le6z0ygt.fsf@gmail.com> (tpeplt@gmail.com's message of "Sun, 03 Mar 2024 16:58:26 -0500") Received-SPF: pass client-ip=2607:f8b0:4864:20::92b; envelope-from=tpeplt@gmail.com; helo=mail-ua1-x92b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:146033 Archived-At: tpeplt writes: > > 1. The URL you provided does not give access to the file > =E2=80=98my-repo-pins.el=E2=80=99 within Emacs. Here is a URL that other= readers should > be able to use in order to view your source file: > > https://raw.githubusercontent.com/picnoir/my-repo-pins/master/my-repo-pin= s.el > > 2. After downloading your source file, I loaded it into Emacs using: > > $ emacs -Q my-repo-pins.el > > 3. I then byte-compiled the file and loaded it into Emacs using the > =E2=80=98Emacs-Lisp=E2=80=99 menu entry =E2=80=98Byte compile and Load=E2= =80=99. (There were a number > of warnings about the use of single quotes in several functions=E2=80=99 > docstrings due to a new syntax requirement, but those can be ignored for > this discussion.) > > 4. I switched to the *scratch* buffer and evaluated the following > expression using C-x C-e: > > (my-repo-pins--clone-project "test/test") > > This caused the debugger to be triggered and a stack trace ("backtrace") > of function calls was generated. That backtrace is included at the end > of this message in case you or any readers might be able to follow it to > point out some error(s). > > Note that I did NOT compile the elisp file natively. The error was > generated after byte-compiling the file only. The positive point from > this is that backtrace might be useful for finding the source of the > problem, and eliminating it from the natively-compiled version, too. > The stack trace above is repeatable if these steps above are followed (and using Emacs 29.2 on GNU/Linux). And it is repeatable if step 4 is followed after exiting the debugger and re-evaluating the expression. However, if the function =E2=80=98my-repo-pins--query-forge-fetchers=E2=80= =99 is instrumented, and the expression (my-repo-pins--clone-project "test/test") is evaluated, then the debugger is NOT triggered and the expression returns the result (# nil nil #) is returned. Before it is returned, the code displays a buffer with a prompt: "Please select the forge we should clone the project from. Press q to close this window." After type =E2=80=98q=E2=80=99, the result above is returned. What does it mean that there are different results depending on whether the elisp code has been byte-compiled or has been instrumented? Is this an indication of an error in the byte-compiler? --