Received: (at 75812) by debbugs.gnu.org; 24 Apr 2025 05:28:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 24 01:28:59 2025 Received: from localhost ([127.0.0.1]:33718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u7p8t-0001H9-9u for submit <at> debbugs.gnu.org; Thu, 24 Apr 2025 01:28:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49582) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u7p8q-0001Gq-Sg for 75812 <at> debbugs.gnu.org; Thu, 24 Apr 2025 01:28:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1u7p8k-00071r-KX; Thu, 24 Apr 2025 01:28:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=sj69zHzg/L01W9/ZhfeD2lCt/AxM8VWo88Qr+bzgmOk=; b=Gm2zmlICnJHJ 4R31pScolx0u+iw6hiZlFm60dd5CEOi2viwsMIcU/0+SGl6lYhUPKu/v+XjnxEU4CTlZ4rFqoDXtu dP3pXA31yPW7tK+09mmPQ/c3LIZuZ7wM3W4SGddT70GILQRBgsyGVfXPc7ZhoJ3jjSrRwH5Q7HuxL 0LgY+OgnejqkpYHa0zegsIo5g0BsUYbnU3LyxUZxINP/trqxfeqcRSPS5IYtMmM2VUC3ReRJbrYKT cIHE+XkseoaVOH0Pd3I/FPd96dgbJlvMqjKJVLuV0BnyBNhCWoomakLQWEQBkf99qTLotYJuIta7V YkqsOowDXmbKwGOvFyBx/w==; Date: Thu, 24 Apr 2025 08:28:43 +0300 Message-Id: <86ikmuyvp0.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Spencer Baugh <sbaugh@HIDDEN> In-Reply-To: <iera586u9mj.fsf@HIDDEN> (message from Spencer Baugh on Wed, 23 Apr 2025 12:26:44 -0400) Subject: Re: bug#75812: 29.2.50; Support native-compiling package-install from batch Emacs References: <iered0sf67z.fsf@HIDDEN> <CADwFkm=15x2PvQK9HDt7VnkuKN70OGnbOo-PneyR4koWwkfGfw@HIDDEN> <iera5bfg7qx.fsf@HIDDEN> <86plkbwckd.fsf@HIDDEN> <yp1frl01fsc.fsf@HIDDEN> <CAN+1HbpY4P7xXrxX+eqo-K4+8KA53VZxibZn_wx-P9mPjg1eTQ@HIDDEN> <iera586u9mj.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75812 Cc: acorallo@HIDDEN, stefankangas@HIDDEN, shipmints@HIDDEN, 75812 <at> debbugs.gnu.org, app-emacs-dev@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Spencer Baugh <sbaugh@HIDDEN> > Cc: Andrea Corallo <acorallo@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, > app-emacs-dev@HIDDEN, stefankangas@HIDDEN, > 75812 <at> debbugs.gnu.org > Date: Wed, 23 Apr 2025 12:26:44 -0400 > > > Conveniently there's already a hook, native-comp-async-all-done-hook, > which gets called when the async native compilation is done. I just > need to synchronously wait for that hook to be called. > > So what about something like this? > > (defun native-comp-async-wait-for-all-done () > (unless (zerop (comp--async-runnings)) > (let* ((native-comp-finished-pipe (make-pipe-process :name "native-comp-finished")) > (native-comp-async-all-done-hook (list (lambda () (delete-process native-comp-finished-pipe))))) > (accept-process-output native-comp-finished-pipe)))) > > The use of a pipe process is weird, but I don't know of a better way to > wait for a hook to be called. That will not work on Windows, so let's not. I don't understand why you need all that complexity. Why not loop calling comp--async-runnings as long as it returns non-nil, each time sleeping for, say, 0.5 sec? Or why not install a native-comp-async-all-done-hook that will notice when compilations are done and allow the batch job to exit? All you need is a means to wait until all the async compilations are finished, no? Or what am I missing? > There's another related issue for the packaging use case I mentioned in > my original email: The .eln files are placed in ~/.emacs.d/eln-cache/ by > default when doing this native compilation. That complicates building > and installing these packages independently. Is there a way to put the > .eln files for a package in that individual package directory instead? You need to tweak native-comp-eln-load-path, e.g. prepend to the default-value list the directory where you want the *.eln files to be written. But you are well advised to leave the other directories in the list alone.
bug-gnu-emacs@HIDDEN
:bug#75812
; Package emacs
.
Full text available.Received: (at 75812) by debbugs.gnu.org; 23 Apr 2025 16:26:53 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 23 12:26:52 2025 Received: from localhost ([127.0.0.1]:58536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u7cw0-00067X-1T for submit <at> debbugs.gnu.org; Wed, 23 Apr 2025 12:26:52 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:53491) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>) id 1u7cvx-00066A-Pj for 75812 <at> debbugs.gnu.org; Wed, 23 Apr 2025 12:26:50 -0400 From: Spencer Baugh <sbaugh@HIDDEN> To: Ship Mints <shipmints@HIDDEN> Subject: Re: bug#75812: 29.2.50; Support native-compiling package-install from batch Emacs In-Reply-To: <CAN+1HbpY4P7xXrxX+eqo-K4+8KA53VZxibZn_wx-P9mPjg1eTQ@HIDDEN> (Ship Mints's message of "Thu, 30 Jan 2025 10:37:39 -0500") References: <iered0sf67z.fsf@HIDDEN> <CADwFkm=15x2PvQK9HDt7VnkuKN70OGnbOo-PneyR4koWwkfGfw@HIDDEN> <iera5bfg7qx.fsf@HIDDEN> <86plkbwckd.fsf@HIDDEN> <yp1frl01fsc.fsf@HIDDEN> <CAN+1HbpY4P7xXrxX+eqo-K4+8KA53VZxibZn_wx-P9mPjg1eTQ@HIDDEN> Date: Wed, 23 Apr 2025 12:26:44 -0400 Message-ID: <iera586u9mj.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1745425604; bh=qncjrBgmxEow8H5e5nmfAtPMJhmnUoX/ODOdLnyTqgE=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=sv98RpdG/sVYcami9DwthGTM/6zqL4tax2jljDJQZvAA8fpzBt/hDDEAcR8EJDYbV 9lfv2KYpv8ejSPgBpDQZvZcQrC7r7uPJA+sESnl54aFlH/qGSsLEmwn60i2hp15YKL Uux7gCz3MQ5PUq987tzbTXuPirMAKYXyDAebqyjcUfG/Ia9OZ+gAhbXFJ190y8OqWA Lj8LQ9bvMGU+QtaSJvbbAu6e3DPp8U9aCbf/7oK+39v6jpzekLT1Z7+MrCQUKy0b7F YMDKadfiWmdq7ftKrlwNB0eGFMANji5HAdUDZLpe6Nbu/h0bzm3ifUAPaIlcJ4yEJY oBkvmxgDt3L5Q== X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75812 Cc: Eli Zaretskii <eliz@HIDDEN>, Andrea Corallo <acorallo@HIDDEN>, stefankangas@HIDDEN, 75812 <at> debbugs.gnu.org, app-emacs-dev@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Conveniently there's already a hook, native-comp-async-all-done-hook, which gets called when the async native compilation is done. I just need to synchronously wait for that hook to be called. So what about something like this? (defun native-comp-async-wait-for-all-done () (unless (zerop (comp--async-runnings)) (let* ((native-comp-finished-pipe (make-pipe-process :name "native-comp-finished")) (native-comp-async-all-done-hook (list (lambda () (delete-process native-comp-finished-pipe))))) (accept-process-output native-comp-finished-pipe)))) The use of a pipe process is weird, but I don't know of a better way to wait for a hook to be called. --------------------- There's another related issue for the packaging use case I mentioned in my original email: The .eln files are placed in ~/.emacs.d/eln-cache/ by default when doing this native compilation. That complicates building and installing these packages independently. Is there a way to put the .eln files for a package in that individual package directory instead? The same directory as the .el and .elc files. The packages are recompiled for each new Emacs version anyway, so I think this should be safe from a versioning perspective.
bug-gnu-emacs@HIDDEN
:bug#75812
; Package emacs
.
Full text available.Received: (at 75812) by debbugs.gnu.org; 30 Jan 2025 15:39:39 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 30 10:39:39 2025 Received: from localhost ([127.0.0.1]:47275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tdWdm-0005TM-Hm for submit <at> debbugs.gnu.org; Thu, 30 Jan 2025 10:39:39 -0500 Received: from mail-vk1-xa32.google.com ([2607:f8b0:4864:20::a32]:55414) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>) id 1tdWdk-0005T4-47 for 75812 <at> debbugs.gnu.org; Thu, 30 Jan 2025 10:39:37 -0500 Received: by mail-vk1-xa32.google.com with SMTP id 71dfb90a1353d-5162571e761so301998e0c.2 for <75812 <at> debbugs.gnu.org>; Thu, 30 Jan 2025 07:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738251570; x=1738856370; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1CdbdwqVCoiR5RSkK25f+ObZrX69Qn3BL7bwtEAWe5E=; b=VPZfP+fSp43/tRzyH8M5MwtEg3DL2KfZZnW5iihBmlJAnhP7tyXGXz6KdN5M+rzcht MVi3QrA87H1Kzy8xBXqRfv724voOW+qzcp0VGxEuFuVxm0W6j841X8L4g7C6pitxIYo/ eqJoMMRY1pRG+z9kV3N+eyO7jGuepMdabz+jR+sQ3b6+xNhwaMO8o3YGGdyq8Cw9UF8W BIl3eSShBWh/oTXXdaLl36HoAx+BGRdg2zp8U9vUBvq6UqTY62dh32gCbK2prqzv7VzV XZT6G+fZ4fZ9nFmNuH2m21/Y9hSk4RUzsb1s564nZXl/AW8H0nXKakejLTQmx3xtfwYL ZwMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738251570; x=1738856370; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1CdbdwqVCoiR5RSkK25f+ObZrX69Qn3BL7bwtEAWe5E=; b=gZyxEFBfvEaOcrv5IqTr+JGZ2tmlJMEmaIDBdh4XXWy7nbxm/uR1iFgaRSRRyN+LD7 yOuRH5iAeELcec1CRXLmSqwOMOXeqgLilyBHOSRyicMJX79dDFgCqATuhyCOgda82cl5 aWqKD5qxqLVEH3oPsclpqeJlwFoPIBqAJ9cGKzQC3a5kq2KKfP9yQQX6ArqghypypGPI PxiT2oUeqImoMmHdg5KZzcSsLVNpZfdKjh3gOVdtNxJSFSUmhsKl9o3jwN9UstbNsg7p SLiI5J0XuvpAEx5SkfNzc4QoxR+bkRMM63FrzdcmtdfX+4DqWojVBTC038HDIqkJ2keg 7cHA== X-Forwarded-Encrypted: i=1; AJvYcCVVqHo4IIdT/0M2UBp28uRTOK/yLTij6PujXq4xx6NqX0cNEoZ3VIR8RyUZFabHczDQPFMVkg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyXjArvlqsKHPopuJ7PGccUQomlOaYyGlAbsoJ6sEIu2/N2loHh B+zR+lvfXfxZfFMTI/1h3uhvjrSCAkfkgSI+lXdJJo6OY0+3vyUXsFhVIX4+FC1KZwnH4IcMVmf rk89ox3jH/K2qen2STiHSwVjicH4= X-Gm-Gg: ASbGncvpYKEhisIG1tPqANiIzzWxRODoghiOWhYnOXJXAiP+GQMD8m23pMSmV5l2GAc zxrhcIszF95TWmkK+vyCX8FOSALLgWn+cUwiniPD7rKcjiiBscsGQ8D/ErrlZGA1hL/JganqS X-Google-Smtp-Source: AGHT+IGd39A4tBQdqY11GQH1iV7cu+GIbupPL3wYsZp9Hd/8bVfRp2kVEbQB/46/UYVKBdmbXXI7ruyXJw0trVdzUDM= X-Received: by 2002:a05:6122:2491:b0:518:859e:87ae with SMTP id 71dfb90a1353d-51e9e4e30bdmr7687791e0c.7.1738251570355; Thu, 30 Jan 2025 07:39:30 -0800 (PST) MIME-Version: 1.0 References: <iered0sf67z.fsf@HIDDEN> <CADwFkm=15x2PvQK9HDt7VnkuKN70OGnbOo-PneyR4koWwkfGfw@HIDDEN> <iera5bfg7qx.fsf@HIDDEN> <86plkbwckd.fsf@HIDDEN> <yp1frl01fsc.fsf@HIDDEN> In-Reply-To: <yp1frl01fsc.fsf@HIDDEN> From: Ship Mints <shipmints@HIDDEN> Date: Thu, 30 Jan 2025 10:37:39 -0500 X-Gm-Features: AWEUYZlGAf9wv2CRWF_9mU7lPjOGugkqWezUKJ1KyxqJxXE4LFsoJtfk-KQQdhU Message-ID: <CAN+1HbpY4P7xXrxX+eqo-K4+8KA53VZxibZn_wx-P9mPjg1eTQ@HIDDEN> Subject: Re: bug#75812: 29.2.50; Support native-compiling package-install from batch Emacs To: Andrea Corallo <acorallo@HIDDEN> Content-Type: multipart/alternative; boundary="00000000000061a862062cee3b65" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75812 Cc: Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, app-emacs-dev@HIDDEN, stefankangas@HIDDEN, 75812 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --00000000000061a862062cee3b65 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable If it is of interest, I wrote the below to visualize the compilation queue. It appears when something is enqueued for compilation, and disappears when the queue is empty. (when (native-comp-available-p) (defvar my:comp--async-running-func) (if (version< emacs-version "30") (progn (declare-function comp--async-runnings nil) (require 'comp) (setq my:comp--async-running-func #'comp-async-runnings)) (require 'comp-run) (setq my:comp--async-running-func #'comp--async-runnings)) (defun my/native-comp-mode-line-lighter () "mode-line lighter for `my/native-comp-mode-line-mode'." (when comp-files-queue (propertize (format " [=E2=97=B4%s:%d/%d]" comp-native-version-dir (length comp-files-queue) (funcall my:comp--async-running-func)) 'face (list :height 0.75)))) (define-minor-mode my/native-comp-mode-line-mode "Display the native compilation queue depth during compiles." :global t :group 'mode-line :lighter (:eval (my/native-comp-mode-line-lighter))) (when my:mode-line-native-comp (my/native-comp-mode-line-mode))) On Thu, Jan 30, 2025 at 10:30=E2=80=AFAM Andrea Corallo <acorallo@HIDDEN> = wrote: > Eli Zaretskii <eliz@HIDDEN> writes: > > >> Cc: app-emacs-dev@HIDDEN, 75812 <at> debbugs.gnu.org > >> Date: Fri, 24 Jan 2025 17:35:50 -0500 > >> From: Spencer Baugh via "Bug reports for GNU Emacs, > >> the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > >> > >> > Sounds good to me, thanks. We'll take patches implementing this. > >> > >> I'm happy to implement this, I'm just a bit lost about where to start. > >> I tried the obvious "iterate over *.el files in the package directory, > >> calling native-compile", but that failed on various files in various > >> packages. > > > > Why not simply wait till all the async subprocesses compiling to > > native code finish and exit? Bonus points for displaying some kind of > > status or progress messages while waiting, so the user is informed why > > the wait. > > > > Andrea, is there a better way you can suggest? > > Not ATM, I agree having some way to visualize/report the status of the > compilation queue would be nice. > > > > --00000000000061a862062cee3b65 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac= e">If it is of interest, I wrote the below to visualize the compilation que= ue. It appears when something is enqueued for compilation, and disappears w= hen the queue is empty.</div><div class=3D"gmail_default" style=3D"font-fam= ily:monospace"><br></div><div class=3D"gmail_default" style=3D"font-family:= monospace">(when (native-comp-available-p)<br>=C2=A0 (defvar my:comp--async= -running-func)<br>=C2=A0 (if (version< emacs-version "30")<br>= =C2=A0 =C2=A0 =C2=A0 (progn<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (declare-functio= n comp--async-runnings nil)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (require 'co= mp)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq my:comp--async-running-func #'= comp-async-runnings))<br>=C2=A0 =C2=A0 (require 'comp-run)<br>=C2=A0 = =C2=A0 (setq my:comp--async-running-func #'comp--async-runnings))<br>= =C2=A0 (defun my/native-comp-mode-line-lighter ()<br>=C2=A0 =C2=A0 "mo= de-line lighter for `my/native-comp-mode-line-mode'."<br>=C2=A0 = =C2=A0 (when comp-files-queue<br>=C2=A0 =C2=A0 =C2=A0 (propertize<br>=C2=A0= =C2=A0 =C2=A0 =C2=A0(format " [=E2=97=B4%s:%d/%d]" comp-native-v= ersion-dir (length comp-files-queue) (funcall my:comp--async-running-func))= <br>=C2=A0 =C2=A0 =C2=A0 =C2=A0'face (list :height 0.75))))<br><br>=C2= =A0 (define-minor-mode my/native-comp-mode-line-mode<br>=C2=A0 =C2=A0 "= ;Display the native compilation queue depth during compiles."<br>=C2= =A0 =C2=A0 :global t<br>=C2=A0 =C2=A0 :group 'mode-line<br>=C2=A0 =C2= =A0 :lighter (:eval (my/native-comp-mode-line-lighter)))<br>=C2=A0 (when my= :mode-line-native-comp<br>=C2=A0 =C2=A0 (my/native-comp-mode-line-mode)))<b= r></div></div><br><div class=3D"gmail_quote gmail_quote_container"><div dir= =3D"ltr" class=3D"gmail_attr">On Thu, Jan 30, 2025 at 10:30=E2=80=AFAM Andr= ea Corallo <<a href=3D"mailto:acorallo@HIDDEN">acorallo@HIDDEN</a>>= wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px = 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Eli Zare= tskii <<a href=3D"mailto:eliz@HIDDEN" target=3D"_blank">eliz@HIDDEN</a= >> writes:<br> <br> >> Cc: <a href=3D"mailto:app-emacs-dev@HIDDEN" target=3D"_bla= nk">app-emacs-dev@HIDDEN</a>, <a href=3D"mailto:75812@HIDDEN= rg" target=3D"_blank">75812 <at> debbugs.gnu.org</a><br> >> Date: Fri, 24 Jan 2025 17:35:50 -0500<br> >> From:=C2=A0 Spencer Baugh via "Bug reports for GNU Emacs,<br> >>=C2=A0 the Swiss army knife of text editors" <<a href=3D"ma= ilto:bug-gnu-emacs@HIDDEN" target=3D"_blank">bug-gnu-emacs@HIDDEN</a>>= <br> >> <br> >> > Sounds good to me, thanks.=C2=A0 We'll take patches imple= menting this.<br> >> <br> >> I'm happy to implement this, I'm just a bit lost about whe= re to start.<br> >> I tried the obvious "iterate over *.el files in the package d= irectory,<br> >> calling native-compile", but that failed on various files in = various<br> >> packages.<br> ><br> > Why not simply wait till all the async subprocesses compiling to<br> > native code finish and exit?=C2=A0 Bonus points for displaying some ki= nd of<br> > status or progress messages while waiting, so the user is informed why= <br> > the wait.<br> ><br> > Andrea, is there a better way you can suggest?<br> <br> Not ATM, I agree having some way to visualize/report the status of the<br> compilation queue would be nice.<br> <br> <br> <br> </blockquote></div> --00000000000061a862062cee3b65--
bug-gnu-emacs@HIDDEN
:bug#75812
; Package emacs
.
Full text available.Received: (at 75812) by debbugs.gnu.org; 30 Jan 2025 15:29:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 30 10:29:41 2025 Received: from localhost ([127.0.0.1]:47254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tdWU8-0004x6-Qd for submit <at> debbugs.gnu.org; Thu, 30 Jan 2025 10:29:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58212) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <acorallo@HIDDEN>) id 1tdWU6-0004wm-17 for 75812 <at> debbugs.gnu.org; Thu, 30 Jan 2025 10:29:38 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <acorallo@HIDDEN>) id 1tdWU0-0000wp-92; Thu, 30 Jan 2025 10:29:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=U4m/DM0TK+6gEseJ4BcV1eOZO1QTM7ug6smEw7XE/LM=; b=nxTwc8R1pzLT4rbOeQPH SAm0Uju5xnAJC0mklVPYuv5QuWDq+Rh2mzT/KIdvAb/YT83RzQAWtyyT/DkOpk5lauJ0AFPTZGQyt Sr8RThPxSaNCdMYl4c85oOgtr7D8yRVtyaOH2J5VRrryhGcLxA8O1bYPXELam9DiPpuD8Wy+9RJ4V LJVITDCJrxRTSaQvby+vUeX1uN9JsPvbPNcqBarF/CIk+gWQfivetpOHTwdaMgwGGDflOY6jwk40w mXC2LhkFukz3cCswSKd0a290Wf3OZyOztR+Qa8qYuW91RaLnG8MmAo9AbisFCrLKpi29gQvyBnxlu vBrGofzeI8rWnw==; Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from <acorallo@HIDDEN>) id 1tdWTu-00048G-40; Thu, 30 Jan 2025 10:29:31 -0500 From: Andrea Corallo <acorallo@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#75812: 29.2.50; Support native-compiling package-install from batch Emacs In-Reply-To: <86plkbwckd.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 25 Jan 2025 09:57:22 +0200") References: <iered0sf67z.fsf@HIDDEN> <CADwFkm=15x2PvQK9HDt7VnkuKN70OGnbOo-PneyR4koWwkfGfw@HIDDEN> <iera5bfg7qx.fsf@HIDDEN> <86plkbwckd.fsf@HIDDEN> Date: Thu, 30 Jan 2025 10:29:23 -0500 Message-ID: <yp1frl01fsc.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75812 Cc: Spencer Baugh <sbaugh@HIDDEN>, app-emacs-dev@HIDDEN, stefankangas@HIDDEN, 75812 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Eli Zaretskii <eliz@HIDDEN> writes: >> Cc: app-emacs-dev@HIDDEN, 75812 <at> debbugs.gnu.org >> Date: Fri, 24 Jan 2025 17:35:50 -0500 >> From: Spencer Baugh via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> >> >> > Sounds good to me, thanks. We'll take patches implementing this. >> >> I'm happy to implement this, I'm just a bit lost about where to start. >> I tried the obvious "iterate over *.el files in the package directory, >> calling native-compile", but that failed on various files in various >> packages. > > Why not simply wait till all the async subprocesses compiling to > native code finish and exit? Bonus points for displaying some kind of > status or progress messages while waiting, so the user is informed why > the wait. > > Andrea, is there a better way you can suggest? Not ATM, I agree having some way to visualize/report the status of the compilation queue would be nice.
bug-gnu-emacs@HIDDEN
:bug#75812
; Package emacs
.
Full text available.Received: (at 75812) by debbugs.gnu.org; 25 Jan 2025 07:57:34 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 25 02:57:34 2025 Received: from localhost ([127.0.0.1]:48305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tbb2s-0007P7-Br for submit <at> debbugs.gnu.org; Sat, 25 Jan 2025 02:57:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54216) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tbb2q-0007Om-4X for 75812 <at> debbugs.gnu.org; Sat, 25 Jan 2025 02:57:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1tbb2j-0003wq-Na; Sat, 25 Jan 2025 02:57:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=99OjFhnSRSPzYUpErRuREnrBy6aPmBKqwfkfME52CMM=; b=l7htKcrHbc/G c0+LqL6tS4tjJxK1AvSWMARwnDfPyTR8tHvLoSiCZ/7oymkO4wlfVbBItgXgjpEgjJnd+V6K8fcH7 3LryqTbfZm+3ehRONmf2MC0ukO7IPdpJesK6lMBdnz92NeHWWbZjgHTaZdb5S5y6q9uGACBX74biK deJ8TZ1j22U3aHEOpAX12oopE09rZAayIl+oDIZ2F/73BpJM6+corC5BKtLVc0y/YHmnNWX7T3ZS6 RtpyQyqKiavlck4OF5xhV81bFpODo2OBDsN21QrBamMxqaYKZV3UK3Bw7glgt57bmP5DMefxhMpv3 qCNkbnKc1VYx89L8iYuYpw==; Date: Sat, 25 Jan 2025 09:57:22 +0200 Message-Id: <86plkbwckd.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Spencer Baugh <sbaugh@HIDDEN>, Andrea Corallo <acorallo@HIDDEN> In-Reply-To: <iera5bfg7qx.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN) Subject: Re: bug#75812: 29.2.50; Support native-compiling package-install from batch Emacs References: <iered0sf67z.fsf@HIDDEN> <CADwFkm=15x2PvQK9HDt7VnkuKN70OGnbOo-PneyR4koWwkfGfw@HIDDEN> <iera5bfg7qx.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75812 Cc: app-emacs-dev@HIDDEN, stefankangas@HIDDEN, 75812 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Cc: app-emacs-dev@HIDDEN, 75812 <at> debbugs.gnu.org > Date: Fri, 24 Jan 2025 17:35:50 -0500 > From: Spencer Baugh via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > > Sounds good to me, thanks. We'll take patches implementing this. > > I'm happy to implement this, I'm just a bit lost about where to start. > I tried the obvious "iterate over *.el files in the package directory, > calling native-compile", but that failed on various files in various > packages. Why not simply wait till all the async subprocesses compiling to native code finish and exit? Bonus points for displaying some kind of status or progress messages while waiting, so the user is informed why the wait. Andrea, is there a better way you can suggest?
bug-gnu-emacs@HIDDEN
:bug#75812
; Package emacs
.
Full text available.Received: (at 75812) by debbugs.gnu.org; 24 Jan 2025 22:35:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 24 17:35:59 2025 Received: from localhost ([127.0.0.1]:47383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tbSHO-0007hF-VX for submit <at> debbugs.gnu.org; Fri, 24 Jan 2025 17:35:59 -0500 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:36417) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>) id 1tbSHN-0007gw-Ae for 75812 <at> debbugs.gnu.org; Fri, 24 Jan 2025 17:35:57 -0500 From: Spencer Baugh <sbaugh@HIDDEN> To: Stefan Kangas <stefankangas@HIDDEN> Subject: Re: bug#75812: 29.2.50; Support native-compiling package-install from batch Emacs In-Reply-To: <CADwFkm=15x2PvQK9HDt7VnkuKN70OGnbOo-PneyR4koWwkfGfw@HIDDEN> (Stefan Kangas's message of "Fri, 24 Jan 2025 16:03:35 -0600") References: <iered0sf67z.fsf@HIDDEN> <CADwFkm=15x2PvQK9HDt7VnkuKN70OGnbOo-PneyR4koWwkfGfw@HIDDEN> Date: Fri, 24 Jan 2025 17:35:50 -0500 Message-ID: <iera5bfg7qx.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1737758150; bh=p5yN0wlervDv7O9SmsYg+wxjLoA2KGBoWc6pFvui2A4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=YZMPCXdvA7HHu0n7NS1RZykS1QcU0Z2ksfGjzP9EAAyp+g5DuK7Yj/yry+fEgqrQl gwuVjwdaCJG3/EjRV72MNk6fPVsluK9gLGjoFGZJFwI4wBSFJZSKj9qCbLm6pnxGc+ y+tXDF0DAqzN7wJul388F3FzkFrRp+fdzdu9g8jfgrUzFtpxOGSEzFE86T4F0QSQum Zci1n+pWHToHkM6Lt6DLUnPTOmrIgWjdz0I7uXSZ2/Xt1kj31SRYi1kGbiWywxi8m6 7Zx5HdR2A4b67yR08+pfJoPExouJw0NbVLXOVwHeE29nJPzsp5cVsCeUJhFJRLXve2 g9+4gPWuN4bTQ== X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75812 Cc: app-emacs-dev@HIDDEN, 75812 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Stefan Kangas <stefankangas@HIDDEN> writes: > Spencer Baugh <sbaugh@HIDDEN> writes: > >> Currently, setting package-native-compile to t will make package-install >> asynchronously native-compile the package. This works great for >> interactive usage. >> >> However, this is unsuitable for a batch Emacs running package-install. >> "emacs -batch --eval (package-install something)" will exit once the >> package is installed, but before the asynchronous native compilation >> completes; the native compilation will just be abandoned. So, >> currently, there's no straightforward way to native compile a package >> from a batch Emacs. >> >> Running package-install from a batch Emacs is useful as a way to update >> or pre-install packages in scripts, without requiring user interaction. >> This is widely used by package managers like Nix or dpkg to install >> Emacs packages as OS packages. In my specific case, it's used to >> install and byte-compile common packages into site-lisp. In all these >> cases, it would be nice to be able to native-compile the package at >> installation time and include the .eln files in the package directory. >> >> A straightforward solution would be for package-install-file to support >> synchronously native-compiling the installed package, such that after >> package-install finishes running, the native compilation is complete. >> Perhaps with a new value of package-native-compile? > > Sounds good to me, thanks. We'll take patches implementing this. I'm happy to implement this, I'm just a bit lost about where to start. I tried the obvious "iterate over *.el files in the package directory, calling native-compile", but that failed on various files in various packages. There's a lot of code in package--compile and byte-recompile-directory, which does a bunch of stuff like ignoring certain files. I guess I need that code. Ultimately, package--compile calls byte-compile-file, so if I could get byte-compile-file to also emit native-compiled files, that would work. Is there a way to do that? byte+native-compile looks like a relevant variable, but is that the right direction to head in?
bug-gnu-emacs@HIDDEN
:bug#75812
; Package emacs
.
Full text available.Stefan Kangas <stefankangas@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Stefan Kangas <stefankangas@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 75812) by debbugs.gnu.org; 24 Jan 2025 22:03:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 24 17:03:46 2025 Received: from localhost ([127.0.0.1]:47310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tbRmD-00034W-LY for submit <at> debbugs.gnu.org; Fri, 24 Jan 2025 17:03:45 -0500 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:48194) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1tbRmA-000347-JD for 75812 <at> debbugs.gnu.org; Fri, 24 Jan 2025 17:03:43 -0500 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-ab2c9b8aecaso458974966b.0 for <75812 <at> debbugs.gnu.org>; Fri, 24 Jan 2025 14:03:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737756216; x=1738361016; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=tHObQOqAkZ25TE+/EPavdl9hT2/QGgCzqwNj+l1wtOM=; b=m1cBfJwu/HenhXZwyvwf4pQfrg7g70aMkmJzxbejWap4NMe3l8IMR73yPkw9qbqRiE RbeEucIYCd59G8Rcjm0bcli2efXQy2ZKrOUhUS727G178HWGh4in9YT9zZ4+lHvuuKTP 2k6uxfNq97j1keBtAxaHOo2deEOmHL9tArQxVKn+N5jSM45VdleOflHjtkQeL1/Hl7Tk MyF17BN4K3Xy5RZGOUnKsxAHrUngFsjMMPW5H6VKm2m0w8hoEcugx8mJgYAvYYbMxlHU oaSnTn0D9jJihmkyugxx+BfGyP93Tgv8jEE98gZHeJNfYrnoFUdlBwTQoODDlbiBfSC7 tllw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737756216; x=1738361016; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tHObQOqAkZ25TE+/EPavdl9hT2/QGgCzqwNj+l1wtOM=; b=aBODcqZglMAh8Vekm0OBSp7PhQcMlYWZhAvSptoMo0lyneKE1nTO+Zn8lRRs0cvVIe a2pfkxfN9/2ly8isyTkEE1f+rXHKuhPaP0qTDYVnzZAJxpE3/M69F80sFr6Rj/U/zvsT budc05L7iJQaf/0snSONDi6tTWCCHDt76ZUYIeRQSOz57yUvO8kzEhLEpFrU4CatIWiA NjGPbbdjnqUoaDDJu773UA2MOMG1oPWH5NsO0qBZ9BB0+e1B8J1XpZ/sbRdPvFWEw4W0 QBT0bbU4T1T6WauoUGDvO61I2vTP571VXXIQ/DPL1VXYvxCmgsBV/zc7k2IpmQu12nna h37w== X-Gm-Message-State: AOJu0YzhfopM8eyklJfRIZV10jUjAFU4dHwbYi3Gop+Th929I6pGmmgz FMJQayqVCr75FVZG52qUml/ooLpCXJSMvbUf0uPqSiypDFWEXDOtAPSPFIGc5VGuoVAfH0baUv5 MSPllbxbqdBDOHnN6bMWQNzPTyZGiXvUg X-Gm-Gg: ASbGncuLHrwghYqswexwEovxXB+/3jHXQqmgRm32XI+SrMnea0KsaDgALW1ETkmk6ZQ Z3uA2Gfm9/NZH/Xn4I7q2igUzYiMfdyMZgnmMT3Ye6RgpIAL4dbDlHjyirsBA3GU= X-Google-Smtp-Source: AGHT+IFns+rZ3WptjMwIWTJLnStw+w5r7MSavF3FVjUV6D+NwTWGqCE0MTLXfOaJMk88/R5zkBEMoQSk5ntUKNousWk= X-Received: by 2002:a17:906:dc93:b0:aa6:7737:1991 with SMTP id a640c23a62f3a-ab38b0b9158mr3365078966b.2.1737756216102; Fri, 24 Jan 2025 14:03:36 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 24 Jan 2025 16:03:35 -0600 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <iered0sf67z.fsf@HIDDEN> (Spencer Baugh's message of "Fri, 24 Jan 2025 12:54:08 -0500") References: <iered0sf67z.fsf@HIDDEN> MIME-Version: 1.0 Date: Fri, 24 Jan 2025 16:03:35 -0600 X-Gm-Features: AWEUYZlSt9Sj_ITpsdZn4nYH0V4PQqPTtpV4k4jEqa513zMtTqN1mVY_02IiM_4 Message-ID: <CADwFkm=15x2PvQK9HDt7VnkuKN70OGnbOo-PneyR4koWwkfGfw@HIDDEN> Subject: Re: bug#75812: 29.2.50; Support native-compiling package-install from batch Emacs To: Spencer Baugh <sbaugh@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 75812 Cc: app-emacs-dev@HIDDEN, 75812 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) severity 75812 wishlist tags 75812 + confirmed thanks Spencer Baugh <sbaugh@HIDDEN> writes: > Currently, setting package-native-compile to t will make package-install > asynchronously native-compile the package. This works great for > interactive usage. > > However, this is unsuitable for a batch Emacs running package-install. > "emacs -batch --eval (package-install something)" will exit once the > package is installed, but before the asynchronous native compilation > completes; the native compilation will just be abandoned. So, > currently, there's no straightforward way to native compile a package > from a batch Emacs. > > Running package-install from a batch Emacs is useful as a way to update > or pre-install packages in scripts, without requiring user interaction. > This is widely used by package managers like Nix or dpkg to install > Emacs packages as OS packages. In my specific case, it's used to > install and byte-compile common packages into site-lisp. In all these > cases, it would be nice to be able to native-compile the package at > installation time and include the .eln files in the package directory. > > A straightforward solution would be for package-install-file to support > synchronously native-compiling the installed package, such that after > package-install finishes running, the native compilation is complete. > Perhaps with a new value of package-native-compile? Sounds good to me, thanks. We'll take patches implementing this.
bug-gnu-emacs@HIDDEN
:bug#75812
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 24 Jan 2025 17:54:22 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 24 12:54:21 2025 Received: from localhost ([127.0.0.1]:46962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tbNsr-0004ok-Hk for submit <at> debbugs.gnu.org; Fri, 24 Jan 2025 12:54:21 -0500 Received: from lists.gnu.org ([2001:470:142::17]:54198) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>) id 1tbNso-0004oR-0P for submit <at> debbugs.gnu.org; Fri, 24 Jan 2025 12:54:19 -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 <sbaugh@HIDDEN>) id 1tbNsi-0006EH-7r for bug-gnu-emacs@HIDDEN; Fri, 24 Jan 2025 12:54:12 -0500 Received: from mxout5.mail.janestreet.com ([64.215.233.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <sbaugh@HIDDEN>) id 1tbNsg-0004uk-KQ for bug-gnu-emacs@HIDDEN; Fri, 24 Jan 2025 12:54:11 -0500 From: Spencer Baugh <sbaugh@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 29.2.50; Support native-compiling package-install from batch Emacs Date: Fri, 24 Jan 2025 12:54:08 -0500 Message-ID: <iered0sf67z.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1737741248; bh=jZPahb10PgY3a29dJgal1w/zeavAZFBzejuE61tpVec=; h=From:To:Cc:Subject:Date; b=LbvCNA14d1V6ptQRS80bkn2wiFB3EIwOz+wWjBjcuc+SSHEqsQyS5colnVg7uCAXR evLqFblAerb2g2+M4Zt/xuq7gtGFLqfHKi5bXIZT9CGSMrXBfoFm3tWvttD2h+Hbyi lUHoNM4YaeU/NqG8AWbuvpVKbL7jJv3SmGVQYgboVg4nQkaUf52SDqwx2vpYucb9EX 3wkcUeMy5dxlANY6I6YCQ+Upq/ccwdztQNCrR52KK+xz6u2oZ6ZXfEOSfYe+aFfwYs MA839LSNpCldz19HnN3i7pLy5pnTQv7KNyB8R9CDf+OuAem/1CoOFw34zi5rpOwlZd 8zhEtlBIMWnIA== Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@HIDDEN; helo=mxout5.mail.janestreet.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: app-emacs-dev@HIDDEN, Stefan Kangas <stefankangas@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) Currently, setting package-native-compile to t will make package-install asynchronously native-compile the package. This works great for interactive usage. However, this is unsuitable for a batch Emacs running package-install. "emacs -batch --eval (package-install something)" will exit once the package is installed, but before the asynchronous native compilation completes; the native compilation will just be abandoned. So, currently, there's no straightforward way to native compile a package from a batch Emacs. Running package-install from a batch Emacs is useful as a way to update or pre-install packages in scripts, without requiring user interaction. This is widely used by package managers like Nix or dpkg to install Emacs packages as OS packages. In my specific case, it's used to install and byte-compile common packages into site-lisp. In all these cases, it would be nice to be able to native-compile the package at installation time and include the .eln files in the package directory. A straightforward solution would be for package-install-file to support synchronously native-compiling the installed package, such that after package-install finishes running, the native compilation is complete. Perhaps with a new value of package-native-compile?
Spencer Baugh <sbaugh@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#75812
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.