From patchwork Tue Aug 29 01:33:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 53271 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 47F7A27BBE2; Tue, 29 Aug 2023 02:36:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E12C427BBE9 for ; Tue, 29 Aug 2023 02:36:12 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaneA-00037c-4E; Mon, 28 Aug 2023 21:35:58 -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 1qane9-00037U-Cl for guix-patches@gnu.org; Mon, 28 Aug 2023 21:35:57 -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 1qane9-0000tf-4d for guix-patches@gnu.org; Mon, 28 Aug 2023 21:35:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qaneE-0004eU-FP; Mon, 28 Aug 2023 21:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65478] [PATCH emacs-team v2] build: emacs-utils: Adjust `emacs-compile-directory' for Emacs 29. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Tue, 29 Aug 2023 01:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65478 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65478@debbugs.gnu.org Cc: Hilton Chain , Andrew Tropin , Liliana Marie Prikler X-Debbugs-Original-Xcc: Andrew Tropin , Liliana Marie Prikler Received: via spool by 65478-submit@debbugs.gnu.org id=B65478.169327290517802 (code B ref 65478); Tue, 29 Aug 2023 01:36:02 +0000 Received: (at 65478) by debbugs.gnu.org; 29 Aug 2023 01:35:05 +0000 Received: from localhost ([127.0.0.1]:49214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qandI-0004d4-R1 for submit@debbugs.gnu.org; Mon, 28 Aug 2023 21:35:05 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:52744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qandG-0004ca-GV for 65478@debbugs.gnu.org; Mon, 28 Aug 2023 21:35:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1693272851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1barlwZn16HliCgBfhmgu62xHN9HJdtp9II58lK9vcg=; b=2x/EwLT8xTWXIHIF3C435nFM2+CMPSmlMJO5CubZp23WZ9p42IyVuehDtGGE05ogOKliMU Dmq3dsaHlKeKbi/ZLPG+sNN952r91j7hNUMEUZSvCtOeK73BU/pcCZqYq+UrwTdpF1Jdw6 o8h05WK7QsJ4HveX7bwBcqpJIGXkqxZYtm0BlxYd/zTD5lWB92ZnHJWzORe+f3ezSDLAtz 8c0SYLq8XsZhKOIooH5OeBH40Qv+wzqSA67VgACraOowEegD4nNP7nC2B0ECIQhWOSYwMW IPX17J+/5GWov3ahOPPSBD000eLe4EdaFBvTY8nluZqlI111Dpie8h0moFPZ5A== Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space Date: Tue, 29 Aug 2023 09:33:45 +0800 Message-ID: In-Reply-To: <5629f5f427c30caa6d43f37ac28c3dd3f1501d01.1692813553.git.hako@ultrarare.space> References: <5629f5f427c30caa6d43f37ac28c3dd3f1501d01.1692813553.git.hako@ultrarare.space> MIME-Version: 1.0 X-Spamd-Bar: + X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches X-Patchwork-Original-From: Hilton Chain via Guix-patches via From: Hilton Chain Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/build/emacs-utils.scm (emacs-compile-directory): After native compilation, write the bytecode file with `comp-write-bytecode-file' when using Emacs 29. --- guix/build/emacs-utils.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) base-commit: 9d074e16c7a9879d67c348c7b2d70b725adfbdfa diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm index ac3dac57d1..f4c18af388 100644 --- a/guix/build/emacs-utils.scm +++ b/guix/build/emacs-utils.scm @@ -140,6 +140,7 @@ (define* (emacs-compile-directory dir) (mapc (lambda (file) (let (byte-to-native-output-file + byte-to-native-output-buffer-file ;; First entry is the eln-cache of the homeless shelter, ;; second entry is the install directory. (eln-dir (and (native-comp-available-p) @@ -148,13 +149,18 @@ (define* (emacs-compile-directory dir) (native-compile file (comp-el-to-eln-filename file eln-dir)) (byte-compile-file file)) + ;; After native compilation, write the bytecode file. + ;; (For Emacs 28) ;; Sadly, we can't use pcase because quasiquote works different in ;; Emacs. See `batch-byte+native-compile' in comp.el for the ;; actual shape of byte-to-native-output-file. (unless (null byte-to-native-output-file) (rename-file (car byte-to-native-output-file) (cdr byte-to-native-output-file) - t)))) + t)) + ;; (For Emacs 29) + (unless (null byte-to-native-output-buffer-file) + (comp-write-bytecode-file nil)))) files)) #:dynamic? #t))