From patchwork Wed Aug 10 17:37:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Morgan Smith X-Patchwork-Id: 41540 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 3FB5327BBEA; Wed, 10 Aug 2022 19:06:24 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=unavailable 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 C1C6327BBE9 for ; Wed, 10 Aug 2022 19:06:23 +0100 (BST) Received: from localhost ([::1]:38916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLq62-0002cV-Uj for patchwork@mira.cbaines.net; Wed, 10 Aug 2022 14:06:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLq5i-0002cH-JM for guix-patches@gnu.org; Wed, 10 Aug 2022 14:06:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLq5i-0001S6-8s for guix-patches@gnu.org; Wed, 10 Aug 2022 14:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLq5i-000378-3s for guix-patches@gnu.org; Wed, 10 Aug 2022 14:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57122] [PATCH] build-system: emacs: Use new function for autoloads generation Resent-From: Morgan.J.Smith@outlook.com Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Aug 2022 18:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57122 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57122@debbugs.gnu.org Cc: Morgan Smith , liliana.prikler@gmail.com X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166015470811901 (code B ref -1); Wed, 10 Aug 2022 18:06:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 Aug 2022 18:05:08 +0000 Received: from localhost ([127.0.0.1]:50727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLq4p-00035r-JK for submit@debbugs.gnu.org; Wed, 10 Aug 2022 14:05:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:54456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLq4k-00035e-Ba for submit@debbugs.gnu.org; Wed, 10 Aug 2022 14:05:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLq4j-0002aH-Pr for guix-patches@gnu.org; Wed, 10 Aug 2022 14:05:01 -0400 Received: from mail-mw2nam04acsn2080b.outbound.protection.outlook.com ([2a01:111:f400:7e8c::80b]:54880 helo=NAM04-MW2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLq4h-00013g-Of for guix-patches@gnu.org; Wed, 10 Aug 2022 14:05:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jP8DBlTyFScA5afsJG2Ca5amxDk4my658V1439MHUUSwyCDWwUVG+J6QxaHjyFzZ0DEHKWYQb6hbQvXxUD/Nxv1LLYO9nZgOO4JSwgopogMpJhEzacsFMwH8dLT9Rx/4Pjc9RqKeq0tCVyfM2dhiZzFc20X0CD/mn8dmuO6WisxNPnWDCBUivIzixehu1E2jnrRf+MQs6O7ALOgOsy9tID1Uij/V85D2fkA/2cCsx6666A8qZ3QUPIKWNi0bt5Zvlgp6kO1CplWVame+AzbxcwC0LCuVr0VYyg1CbCZ4KIsqgb9Yx/NX6eDTBLuxQ5VdLQIU1fk9tIDjah9hbqf4Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tC6LtachsXmYr9ow0rSZARdHWavrqYszJl7xr4XRbw0=; b=Q0+U6JLRCHBTvvKnkAhJE20aq+CaH7DvRjtNjrerJh8iXn3XQ7zMUnHHD7sGepvykyp7GeeyF5Cg87ymmFzuQR5zH57DPkxtN6crwy6n68jYC2jgdb+dQgR9RaR1kQJKBJOUX62qZIDi98mK6A4TCAgrWQfY9Ops2AK6Hvsflo1ZawGv/5jwneH8VJvR1MuJe54kkwMsSsVhcvXHI7vWHLypV5/aPr9lHMNOc68054KukJAsemaHhIRMmWms65uQdokWcqYC4+NpNlLiBNZTuzoUkeCMIFSaLuuxkL58fzXst5oxpxd6jSge/NSUJlKtQ6mRSO3nM46BHRDd7ZggSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tC6LtachsXmYr9ow0rSZARdHWavrqYszJl7xr4XRbw0=; b=tdMsAV3cR7y7KAvemyELnV412OStqyXY8qZApxB/Lcs7eMBXp1nX5HGv+er8ha3/5KQpUiDMAugjVOpbB5Ad1mSMmB8qj0gWsuzhSA7PvU3ukaPxgxSvNqdO5/SRr0sJGWHM3l/PpopHWYtOm1FOKJvpYiViCTS1U3tjBOcB98Lezfl0uuFJvwmB38RrGxZbOnX1QdyA2OfzLa/ZcBg0SjVO2oiJg3+dV7sM69UZ1S3iFJirM2wmHF5F75O1+ulTSG26LK56AnjWI76GxvSdhZP1/YGTckaJzu/1Iwfan8cEDwhbUYRNyxyv3fy770rzpoHupmchIrur6GNU5zLxtQ== Received: from DM5PR03MB3163.namprd03.prod.outlook.com (2603:10b6:4:40::24) by MN2PR03MB5216.namprd03.prod.outlook.com (2603:10b6:208:1e8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.11; Wed, 10 Aug 2022 17:59:52 +0000 Received: from DM5PR03MB3163.namprd03.prod.outlook.com ([fe80::1cf8:e25b:a93b:ffac]) by DM5PR03MB3163.namprd03.prod.outlook.com ([fe80::1cf8:e25b:a93b:ffac%6]) with mapi id 15.20.5504.021; Wed, 10 Aug 2022 17:59:52 +0000 From: Morgan.J.Smith@outlook.com Date: Wed, 10 Aug 2022 13:37:09 -0400 Message-ID: X-Mailer: git-send-email 2.37.1 X-TMN: [VCmdh0mDuknLh6ZdDb42nS39TQT/xCxK] X-ClientProxiedBy: BL1PR13CA0246.namprd13.prod.outlook.com (2603:10b6:208:2ba::11) To DM5PR03MB3163.namprd03.prod.outlook.com (2603:10b6:4:40::24) X-Microsoft-Original-Message-ID: <20220810173708.25556-1-Morgan.J.Smith@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 487709fa-54ae-4230-4da5-08da7afa1fae X-MS-Exchange-SLBlob-MailProps: Ad+mZBy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CBKawcGuxBX8+2zAuSGQyzVzbslIMoEtoC74Nnc1Qu0MOl5BE8JgiEGn6fTU+HI4ZJ+f9JyRcGe/0OUWZjRSmuRW4G/qu+G1KUpy1tOo9qoViPsP1PdEhlXAiAT/9rXkqq2BFhxWCyLJHdyKpD/12wNRHLWrOIotGwqoiQ+jQbL/60Qxxjp4cgzrTE69Ry8PdKLHHkRNh7/iTLZ1sdvmai0Q6PYSXKjVlEMZwNM5HCwXtVxlO4zf62//XomMUtzYRo5w0gZSU0v+Q7YVQ0I43IczD7IpnnHOTkRSg6yVQBRloo8i7rqx1DE90QPI+/ZFCu2Vhm9veEIVRCR1YovddSr9O0Ps3luOKsFO2GGJPVXBLI9IV3IQBZi9h1k/piLBuY+u/otmeMDwduMeazoNe7ro9AKmD7jRd18+P5GKmJcUw1b8C+X3wq+eLol7BySHlCxFByZwJR2HBNPdaAFImcJ63TAkVukmvukbSiI34SySkCbBxKzB5ksaPE4SqjVXI98pXmwUVcASZXxg3wI6+iUPrnywVKOSlIIfjxTokC3Kop8V5Q394UPNm6q8egDvgxj7GsTo6IKAWPfx7otbij577ypzUGPGxxmhK4R55gfrAfuILYM= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 487709fa-54ae-4230-4da5-08da7afa1fae X-MS-Exchange-CrossTenant-AuthSource: DM5PR03MB3163.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2022 17:59:52.2650 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR03MB5216 Received-SPF: pass client-ip=2a01:111:f400:7e8c::80b; envelope-from=Morgan.J.Smith@outlook.com; helo=NAM04-MW2-obe.outbound.protection.outlook.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, 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-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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: Morgan Smith * guix/build/emacs-utils.scm (emacs-generate-autoloads): Use 'loaddefs-generate' to create autoloads instead of 'update-directory-autoloads' if we are using a new enough Emacs --- I'm not sure how long it takes to rebuild all the Emacs packages so I CC'd Liliana since they are going to change the Emacs build system soon anyways. This change is to allow packages to be built with the latest commits of emacs (guix build emacs-crdt --with-input=emacs-minimal=emacs-next --with-latest=emacs-next) Just last week the 'update-directory-autoloads' function got deprecated and replaced. Since continuing to use the deprecated function would require changes anyways (adding a '(require 'autoloads)' would do it I think), I decided to just use the newer function. Is this a bug in upstream Emacs where autoloaded functions like 'update-directory-autoloads' don't get autoloaded when they are in the obsolete directory? Possibly. Is this a bug related to our packaging of Emacs? Possibly. Is this the intended behaviour? Possibly. I'm not the guy to ask :P. I'm really not sure why this stopped working. But we will have to switch to the 'loaddefs-generate' function eventually anyways so I think this patch is probably good to apply. Thanks, Morgan guix/build/emacs-utils.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm index 8ee547f2b3..180c3ae08c 100644 --- a/guix/build/emacs-utils.scm +++ b/guix/build/emacs-utils.scm @@ -105,7 +105,11 @@ (define (emacs-generate-autoloads name directory) (let* ((file (string-append directory "/" name "-autoloads.el")) (expr `(let ((backup-inhibited t) (generated-autoload-file ,file)) - (update-directory-autoloads ,directory)))) + (if (not (require 'loaddefs-gen nil t)) + ;; Emacs <= 28 + (update-directory-autoloads ,directory) + ;; Emacs >= 29 + (loaddefs-generate ,directory ,file))))) (emacs-batch-eval expr #:dynamic? #t))) (define* (emacs-byte-compile-directory dir)