From patchwork Fri Sep 1 16:15:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 53367 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 D052527BBE2; Fri, 1 Sep 2023 17:18:03 +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 2F19927BBE2 for ; Fri, 1 Sep 2023 17:18:03 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qc6qJ-00046G-Gu; Fri, 01 Sep 2023 12:17:55 -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 1qc6qH-000463-07 for guix-patches@gnu.org; Fri, 01 Sep 2023 12:17:53 -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 1qc6qG-00055F-OI for guix-patches@gnu.org; Fri, 01 Sep 2023 12:17:52 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qc6qP-0007Na-Ko; Fri, 01 Sep 2023 12:18:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65478] [PATCH emacs-team v3] 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: Fri, 01 Sep 2023 16:18:01 +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.169358505028317 (code B ref 65478); Fri, 01 Sep 2023 16:18:01 +0000 Received: (at 65478) by debbugs.gnu.org; 1 Sep 2023 16:17:30 +0000 Received: from localhost ([127.0.0.1]:33739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qc6pu-0007Mf-Fs for submit@debbugs.gnu.org; Fri, 01 Sep 2023 12:17:30 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:49228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qc6ps-0007MX-CX for 65478@debbugs.gnu.org; Fri, 01 Sep 2023 12:17:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1693584989; 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=v1QN+I+qeKUi157FTMP2dwWZtz7ZdczcOoxI3P5gTK4=; b=YkdUKcMfLhcfHzvvQBZrHsjYOToDv+5C56IzpX9zNKlyUEuxBVAcbdSNxLzoQRe9eX7ycA YYJS3ucSsS0zv08tFy5nJyZmiGRSRBIBcd6X7lk/2WwajvN1K5Hm/mXAIz8mCXO4E3xg4V 8bj29UqvNlCbuAvEsojXcI9x5KaPedNnTZTpNkccJC0oWW/IuqVj7A2IXcqwpJxIByMIGg z6CGzkjD6ShLpP4ueQFWKA1ruUOD03kFocADrA7nmbhpJQOhiUbuFrhHL7NQAPbS9s5MTg q98f3ekX58fmpEJp8W60mGs6/KzWw5lpXNoM+S4ehpR4/B5Fm97zKsCuPZ1/fg== Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space Date: Sat, 2 Sep 2023 00:15:29 +0800 Message-ID: <40fb61f0682e94c0fe402efad0193463e1f8b6bf.1693583097.git.hako@ultrarare.space> 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'. --- guix/build/emacs-utils.scm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) base-commit: 9d074e16c7a9879d67c348c7b2d70b725adfbdfa diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm index ac3dac57d1..8e12b5b6d4 100644 --- a/guix/build/emacs-utils.scm +++ b/guix/build/emacs-utils.scm @@ -139,7 +139,7 @@ (define* (emacs-compile-directory dir) (files (directory-files-recursively ,dir "\\.el$"))) (mapc (lambda (file) - (let (byte-to-native-output-file + (let (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 +148,9 @@ (define* (emacs-compile-directory dir) (native-compile file (comp-el-to-eln-filename file eln-dir)) (byte-compile-file file)) - ;; 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)))) + ;; After native compilation, write the bytecode file. + (unless (null byte-to-native-output-buffer-file) + (comp-write-bytecode-file nil)))) files)) #:dynamic? #t))