From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id WACUMbqTEmf8iwAA62LTzQ:P1 (envelope-from ) for ; Fri, 18 Oct 2024 16:58:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id WACUMbqTEmf8iwAA62LTzQ (envelope-from ) for ; Fri, 18 Oct 2024 18:58:34 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Hu+sIuX6; dkim=fail ("headers rsa verify failed") header.d=runbox.eu header.s=selector1 header.b=dHtfmhF0; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=runbox.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729270686; a=rsa-sha256; cv=none; b=d9eiZC3fdaR2UePwCNAkWc74diBUAcKF/b/GxChy+9kOlN5sLmSOLMTm49EkoG3puFQihL CIXPPLEsH8/SkrqrmRDLzt5mzQwl43a92VKoH7qxQsOk2oZ4PVWXKiE/w6V1QS07Rs7p4n 40tx4000hCBSwqVPDtN86TYksA1alYmiV4TfNot/Rq9ct5b5CYY2Y2gJlUIZQg6ZOsuHSz jQehVxytmNU5G7nfloiYCfPz1dFMcn/sZu+ENXJ4heJ6NZTZJyqD4VZoORmkxljxA4oivj E7Rb1BcN5uoQWig7NUusp9jK9vydMrbCjjZZqAIOxJU9p1rwQlh0SRVEfrgAjw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Hu+sIuX6; dkim=fail ("headers rsa verify failed") header.d=runbox.eu header.s=selector1 header.b=dHtfmhF0; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=runbox.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729270686; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=XHaP2ebtVtdhiu3RkSUM0YmCQvXI3v9ZVQ6vdqACTsc=; b=I20JLe006P3+FvwWdOfhq4Ltvo324osxPbzCXXySMkadXQ59h3WlCb6vJYj+ezK6/bPo35 /LBZjpYgKxggJWH9f9My3Wb8JCglCTPZURYfI0arqYl/RS2HGIX/R0+LhUDaPy4+bW5yqp lwSzshZ0/eXXfFtVQRtE2jHw1t3O6KYWJNUj5zxPOgUzB9Ak14Nz1Lc9AuZsLb/ZCClNvs oF0w96UAsYOPOn4imbQcxk1ZNfvHhKJZ2YmFJSAl0zPJ38meM4f5h9aMIZlHJktZ3/8Ax8 TIPtbGw1SLKT1Hw1QSuQbBfeZZWZnI0i3SlzfT3B9u1k+TebQ3ymg+zRN+obnQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 09AC96D66 for ; Fri, 18 Oct 2024 18:58:06 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1qIL-0001pN-1k; Fri, 18 Oct 2024 12:57:45 -0400 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 1t1qIH-0001ok-Bo for bug-guix@gnu.org; Fri, 18 Oct 2024 12:57:42 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1qIF-0000cX-RW for bug-guix@gnu.org; Fri, 18 Oct 2024 12:57:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:References:Date:From:MIME-Version:To:Subject; bh=XHaP2ebtVtdhiu3RkSUM0YmCQvXI3v9ZVQ6vdqACTsc=; b=Hu+sIuX6HBN0lWysR3FafF0eRsOsBy5sqxoq45UoxjYru5uM15Nexx1YvHG1BAzK7LcBMyk+nbtm5+IJ7iSe7PKdoLicADv/EdTp1zANR6w3vaDKEPeOWePHE2/3ZwYsPewAd2Ap6TzKdG536Rq6bXA1l+hN0j4/O8Ng+MBKTn22ngSRJiulTV+G91874VLETI/8jmbUCqimD9yeBLFbs7dC/Y/hhjPGq3MD0sfHXd+nIX1W2lS8Ir3E/UPue393ohMdPJkrTMHOC+OLZmMP4900tw4HdXJv7qpIveQwnlPNumyjyJgMLUkCnzIILpsKB27hlvS0Vpz+fsFzi5qYvQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t1qIc-00015J-CO for bug-guix@gnu.org; Fri, 18 Oct 2024 12:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#73681: Maybe partly undo the patch on Elisp comp-el-to-eln-filename Resent-From: "Martin =?UTF-8?Q?Edstr=C3=B6m?=" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 18 Oct 2024 16:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73681 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "Liliana Marie Prikler" Cc: 73681 <73681@debbugs.gnu.org> Received: via spool by 73681-submit@debbugs.gnu.org id=B73681.17292706734144 (code B ref 73681); Fri, 18 Oct 2024 16:58:02 +0000 Received: (at 73681) by debbugs.gnu.org; 18 Oct 2024 16:57:53 +0000 Received: from localhost ([127.0.0.1]:39889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1qIS-00014m-S4 for submit@debbugs.gnu.org; Fri, 18 Oct 2024 12:57:53 -0400 Received: from mailtransmit05.runbox.com ([185.226.149.38]:40730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1qIQ-00014G-Pq for 73681@debbugs.gnu.org; Fri, 18 Oct 2024 12:57:52 -0400 Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1t1qFr-00AZaY-2Y; Fri, 18 Oct 2024 18:55:11 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.eu; s=selector1; h=Message-Id:In-Reply-To:References:Date:Subject:CC:To:From: MIME-Version:Content-Transfer-Encoding:Content-Type; bh=XHaP2ebtVtdhiu3RkSUM0YmCQvXI3v9ZVQ6vdqACTsc=; b=dHtfmhF0IAV85UVs1/C3KUyHaE 1cZesfp+w7eXqiK1Zn1nUZgBepIdLYSrg4sjixcWpRktkpDRNoj8F86FhZ7NqFGG6LdmrU+Rgnji0 pP9qNxSdDLHf4oi614Jlo4tkFhABumX0IkH+ahYsf0ghJyhLzPiRXIWPwI9OR4jEBDjfADTbELk5G aOuEO3ZktQAiVVez4ZvZYGnLXS+paj+sPeMjH2Cu/Dsp4ZAfazcN8IzrBHe5dTUBySY2o7jJOD02h lbmNrfw1tGWTz6Vk42UJ/bgt3rN91pKB2N8GsUIhHmWwJ0LWOsTenMQVJ9HGLJ4ueYE9GRD9ydShq /Dyr0zoQ==; Received: from [10.9.9.128] (helo=rmmprod06.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1t1qFq-0007kh-KN; Fri, 18 Oct 2024 18:55:10 +0200 Received: from mail by rmmprod06.runbox with local (Exim 4.86_2) (envelope-from ) id 1t1qFq-000402-Iv; Fri, 18 Oct 2024 18:55:10 +0200 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received: from [Authenticated alias (1196375)] by runbox.com with http (RMM6); Fri, 18 Oct 2024 16:55:10 GMT From: "Martin =?UTF-8?Q?Edstr=C3=B6m?=" Date: Fri, 18 Oct 2024 18:55:10 +0200 (CEST) X-RMM-Aliasid: 1196375 X-Mailer: RMM6 References: <58598114857dce8a25e3b4d0477d212467a0173f.camel@gmail.com> <518988807953a1b77acb5f9833992fa9ced883c1.camel@gmail.com> In-Reply-To: <518988807953a1b77acb5f9833992fa9ced883c1.camel@gmail.com> Message-Id: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.70 X-Spam-Score: -1.70 X-Migadu-Queue-Id: 09AC96D66 X-Migadu-Scanner: mx12.migadu.com X-TUID: XoKGiYWMb4v3 In case anyone reads this, I believe I have the right algorithm now. First, the trick to locate an .eln regardless of OS: (comp-lookup-eln (locate-library "my-library.el")) Turns out I do not need the trick, because if an OS like Guix has indeed shipped an .eln and set it up to be loaded, then `symbol-file` should return that one. TL;DR: it took a while to figure out, but the following snippet is how my program chooses an .el, .elc or .eln that corresponds to currently loaded Lisp definitions, so that we know the file is safe to be executed by a subprocess. If the current definitions come from an .el, then it opportunistically builds an .eln and returns that instead. =20=20=20=20 (let ((loaded-file (or (ignore-errors (symbol-file 'a-func-from-my-library nil t)) (symbol-file 'a-func-from-my-library)))) (if (string-suffix-p ".el" loaded-file) (let ((out (comp-el-to-eln-filename loaded-file))) (native-compile loaded-file out) out) loaded-file))=