From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id KPlSHaHH0GV5LAEAqHPOHw:P1 (envelope-from ) for ; Sat, 17 Feb 2024 15:50:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id KPlSHaHH0GV5LAEAqHPOHw (envelope-from ) for ; Sat, 17 Feb 2024 15:50:09 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=bayesians.ca header.s=protonmail2 header.b=fEa1BvAG; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708181409; h=from:from:sender:sender:reply-to: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=X7F6DUguHA36WsuNcMSszbSunbef1LzRul3g6mIYsyU=; b=hAoXa3pHZp3qvDT5qq5VRDRtKdp9zAzBulUgy2ko8HsMcVoKTCgIfbn7oedvuwuK4Jsp7D 2bhVPoc80O46FMWJzOPDXIWvUiIX2mCMFr4BOugKKj9L7rmg5O7VOkC9hzRyyr/NYUdxrW jZjCk+KLKI/crHh1+J46hUdZfmfYsWRIsv3A8l1RWxsk98kaJ75S3htA1Vd/HIXyQj2CgO Q2nxXiV9MbVmuE2ZBKAQAchSyhZ5LszgAM3Gkj0oOyjEz3VyHcTgW5D6u2WHcCrqCbOiJe LZPzo8YxAD2l3NInFjhqLn2RJjxKPad1eXuZUuFe4RIXo4Y4ZwK2cLoEGNRwgg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=bayesians.ca header.s=protonmail2 header.b=fEa1BvAG; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708181409; a=rsa-sha256; cv=none; b=JtppMCmnnkRinJ5V9V9Yf9ab6uzO+/xXZrgVWvklaUiTHtW/MoOWNh8S/q0wq43ZpYJCys w8t6rAHmxtHjM5juu/z9QXfSGQMXJJ6x9bHESzr6AxFKeIDDW77KrGWaSJ9oZ6EyZRrk50 JiCotKv01VTVWZMSfZ//pdyzanXXC3xuXoNbuBfXN0Kw32wiZ3RRZ144e2v/SN9eYQ+B63 cSPV7n19WdUX6hTi/DNg/g3mV+AWP6ZZOTAbxozfNN6hU/7m2fUTiRLif+9q7BdDYTxCP/ wSesJrClMc5zUej7PUdU+xIYRCAhp4s5PHcnOemCG0otRdkieSNTTZqYDS3bxQ== 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 32047DF91 for ; Sat, 17 Feb 2024 15:50:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rbM0e-0007HU-Dw; Sat, 17 Feb 2024 09:49:44 -0500 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 1rbM0c-0007Gg-D0 for guix-patches@gnu.org; Sat, 17 Feb 2024 09:49:43 -0500 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 1rbM0c-000582-4p for guix-patches@gnu.org; Sat, 17 Feb 2024 09:49:42 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rbM0w-0001zw-0C for guix-patches@gnu.org; Sat, 17 Feb 2024 09:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67260] [PATCH emacs-team v10 0/7] Preload most of the things References: In-Reply-To: Resent-From: Suhail Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Feb 2024 14:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67260 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: cox.katherine.e+guix@gmail.com, 67260@debbugs.gnu.org, Suhail , andrew@trop.in Received: via spool by 67260-submit@debbugs.gnu.org id=B67260.17081814017670 (code B ref 67260); Sat, 17 Feb 2024 14:50:01 +0000 Received: (at 67260) by debbugs.gnu.org; 17 Feb 2024 14:50:01 +0000 Received: from localhost ([127.0.0.1]:60582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbM0u-0001zd-3W for submit@debbugs.gnu.org; Sat, 17 Feb 2024 09:50:00 -0500 Received: from mail-4022.proton.ch ([185.70.40.22]:57227) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbM0r-0001zO-Ey for 67260@debbugs.gnu.org; Sat, 17 Feb 2024 09:49:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bayesians.ca; s=protonmail2; t=1708181370; x=1708440570; bh=X7F6DUguHA36WsuNcMSszbSunbef1LzRul3g6mIYsyU=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=fEa1BvAG31ZJTpAEPII3ZsJGDU9vuhSbAFi3zQlegWKqJoR+IjKCA+4T7I8SjSuG7 yajXFHdhrnxk6TyIR5Y1AWxu2D8djJgYa+DqCv3Aul2sQsse35V3gbO+RdTu3eh2Lb Zne7OpUBpdDxDGKkxqBb7MLqzvJ+y7TNmwUuOAb250SAzw8HghP8DpSvfombLwpqBQ MClzK2x10hqEYa5Gum73M80X45Q0YRnEcRXjmk2hicppkzI78FADuxjAipZ9Jti5i0 IPtRVsGyDb/9Ww3XDe3fgvYidv04M0W1AhzkwhVqtpyPIvOQ+9CpEVlBM4yuZQHb1C wQq320v+NIs/A== Date: Sat, 17 Feb 2024 14:49:22 +0000 Message-ID: <875xyndu36.fsf@bayesians.ca> Feedback-ID: 38691229:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Suhail X-ACL-Warn: , Suhail via Guix-patches From: Suhail via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -3.61 X-Spam-Score: -3.61 X-Migadu-Queue-Id: 32047DF91 X-TUID: hHfBdM+g4Cgg Liliana Marie Prikler writes: > With this series I get 94/97. I was able to confirm that as well. > The remaining three Namely, the 'ucs-normalize, 'mule-util, and 'term/internal features. For each of these the .eln files exist, but the version that gets loaded in Guix is the byte-compiled one, unless some extra steps are taken. > ... don't appear to be preloaded through the loadup script, so I have > no idea how to catch them or whether it's even worth doing so. I dug into this a little deeper. It seems that by adjusting the load-path one is able to load the natively-compiled variants instead of the byte-compiled for these features. Oddly, this adjustment doesn't seem to be needed in non-Guix Emacs which may suggest the presence of a bug. I'm hoping you have some insight that explains this difference in behaviour. After modifying the previous test-native-comp-p--preloaded.el (in hindsight, the preloaded part may be a misnomer) with the below patch I got all the 97 cases passing. #+begin_src diff diff -u ./test-native-comp-p--preloaded.el ./test-native-comp-p--preloade= d.el --- ./test-native-comp-p--preloaded.el=092024-02-17 08:49:36.294930488 -0= 500 +++ ./test-native-comp-p--preloaded.el=092024-02-17 08:38:45.102839041 -0= 500 @@ -155,8 +155,50 @@ (x-dnd-init-frame) (x-handle-no-bitmap-icon))) =20 +(defun hack/tweak-load-path-in-guix () + "Tweak `load-path' to allow natively compiled versions to be loaded. + +If we ensure that the `load-path' entries for `term/internal', +`mule-util' and `ucs-normalize' exist and they occur before the +share/emacs//lisp entry then we are able to load +the natively compiled versions of these libraries. Of those +three, the entry for `term/internal' is missing whereas the +others currently occur after the share/emacs//lisp +entry. We remedy that here. + +Notably, in non-Guix Emacs this isn't needed. I.e., the fact +that the share/emacs//lisp entry precedes the +entries for `mule-util' and `ucs-normalize' is okay as is the +fact that the entry for `term/internal' is missing." + (when (getenv "GUIX_ENVIRONMENT") + (require 'find-func) + ;; first we'll add the missing entry for `term/internal' + (add-to-list 'load-path + (directory-file-name + (file-name-directory + (find-library-name (symbol-name 'term/internal)))) + ;; NOTE: we don't need to append; doing so simply to co= nfirm that + ;; it's only the relative position wrt the + ;; share/emacs//lisp entry that matters. + t) + ;; then we'll ensure that the entry for share/emacs//= lisp is at + ;; the end + (let* ((sitelisppath (format "/share/emacs/%s/lisp" + emacs-version)) + (pathsuffix (seq-filter + #'(lambda (x) + (string-suffix-p sitelisppath x)) + load-path)) + (pathprefix (seq-filter + #'(lambda (x) + (not + (string-suffix-p sitelisppath x))) + load-path))) + (setq load-path (append pathprefix pathsuffix))))) + (defun report/compilation-status/run () "Run all cases and report those that aren't native-compiled." + (hack/tweak-load-path-in-guix) (let* ((results (mapcar (lambda (args) (apply #'report/compilation-sta= tus args)) report/compilation-status/cases/preloaded)) (failing (seq-filter (lambda (x) (not (eq (cdr x) 'native-compi= led))) @@ -169,5 +211,5 @@ (if failing (concat (format " %s failing cases below:\n\n" numfaili= ng) (pp-to-string failing)) - " Success!")))) + " Success!\n")))) ;; guix/hacking/reviews/emacs-aot/test-native-comp-p/preloaded ends here Diff finished. Sat Feb 17 08:50:04 2024 #+end_src I'm also attaching, for reference, the updated test-native-comp-p--preloaded.el in its entirety. --=20 Suhail