From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ship Mints Newsgroups: gmane.emacs.bugs Subject: bug#65035: 29.1; Port flycheck-emacs-lisp-initialize-packages to flymake Date: Thu, 14 Nov 2024 08:25:24 -0500 Message-ID: References: <87o73b6vmk.fsf@pengjiz.com> <86o73bds9e.fsf@gnu.org> <87ed44s8o7.fsf@pengjiz.com> <86y11sn4rw.fsf@gnu.org> <87msi23vyb.fsf@pengjiz.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b427f30626df6270" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27212"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Spencer Baugh , Eli Zaretskii , joaotavora@gmail.com, 65035@debbugs.gnu.org To: Pengji Zhang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 14 14:27:19 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tBZsU-0006sf-Mc for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Nov 2024 14:27:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBZsG-0001ip-WB; Thu, 14 Nov 2024 08:27:05 -0500 Original-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 1tBZsF-0001iB-7u for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 08:27:03 -0500 Original-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 1tBZsE-0007Om-NN for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 08:27:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=j70UBdOdQJel7McHvikYXoZkJA2+JdYAf9If0Jy/fTM=; b=jVj5DyIGlTyCpY7wzYdto+VpOqAtZdMinVwi3d01HKJdKJXHsrIrJp8e9EP1L7YS/yuKlGN2wARFKCw/nenjzbWqHx/z/6zLy3pRMgsK/IrhhkixNsB9+p8WeILFd4dQPPNjAVd+ON9ZFnhOgHOSKgkqp2brjUJY3K071z3kqRQfrfp4phglsJTql5bg7eEPjiUrZ8bXm5Wf8DrcdB8yTTJxiyiwBnPDPNovjV2jxeQNPrS3TeEMIplUZ6rm512dQup8Qssz7QQ9hZJ5NPA22FP3SiFdq6QauY8jz3QrxBrCNLt7agaLTOUzdavyUKYi2Kw1GAxou5cgg4nP6TWFzQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBZsE-0006mH-Ef for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 08:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Nov 2024 13:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65035 X-GNU-PR-Package: emacs Original-Received: via spool by 65035-submit@debbugs.gnu.org id=B65035.173159080526021 (code B ref 65035); Thu, 14 Nov 2024 13:27:02 +0000 Original-Received: (at 65035) by debbugs.gnu.org; 14 Nov 2024 13:26:45 +0000 Original-Received: from localhost ([127.0.0.1]:45569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBZrw-0006ld-DO for submit@debbugs.gnu.org; Thu, 14 Nov 2024 08:26:44 -0500 Original-Received: from mail-ua1-f44.google.com ([209.85.222.44]:58458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBZrt-0006lN-GW for 65035@debbugs.gnu.org; Thu, 14 Nov 2024 08:26:42 -0500 Original-Received: by mail-ua1-f44.google.com with SMTP id a1e0cc1a2514c-856d51de64aso183289241.0 for <65035@debbugs.gnu.org>; Thu, 14 Nov 2024 05:26:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731590736; x=1732195536; 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=j70UBdOdQJel7McHvikYXoZkJA2+JdYAf9If0Jy/fTM=; b=C8MW9xgkjJv9lJ4HcpLpFQ2dFW++PkMFR73nQEHQltDV7vURA1hx0VQxl5OasnbDzM KUEx/HCGMadWL3KVavwiZNz4QjOPB2be78L0jShnK3OzyRDWeETPcWLUOczwOSl9ssDK I7UwtXhH2KK0BWKqUIv5WdFkIrX7aCNPPa5QUsHYxqsyAtejsH9xocJATa4vMD9zUmVH acrLdy+xridqnLxdkCeeESURGgf3OEpZsUhoSM1aEQjI/z/MogA/YrgSRooUZR8v9tZc wJhXPV2ekxjaaZObEK3Ga/JwFlhsTX2jWjnH7k2h2GAGko64obSLzXJ13rlsukZgmw8X SCPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731590736; x=1732195536; 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=j70UBdOdQJel7McHvikYXoZkJA2+JdYAf9If0Jy/fTM=; b=EGNJFrN1/9J1YyPx8Lxj2rPjNBOpc3edJEctsswAMfYBXzaxQcEtNbZJF1dXVq2ccn /gdnA4zxYLK3uH0/wT30ZcwbTTIQmPUgI0q94n53MLyFLlo4WbUo3hYswjQUSo+qulxl ooxxijjZSDx+L/uXUma9y4BgvQXKEJVDrW6F/PeRW2Q3GAxhTmOmGhPYHRb1rYvcinLB SGiPEJ2q5oBTdUypnrortxGVCgk/tyxbAjpidTvnOgepajVmaTOt5Nv6cIWG7agVbqBb dsYBJys5boMp5Hzo7L7bTNvOHDnS5bGlaYl6wxvmECSW1OrZr6AGCt2oNZjDQ1/WXk3I mSMA== X-Forwarded-Encrypted: i=1; AJvYcCXN/MXVy/6+/vHRGKLEeLQ1r/q4HOKArOtTZHfkt0W8qm+YdhYYjwc0qAsZ2MdEr5+c4mk0Zw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxbg9XvkWbA4mYZ+fG2YkDoPaBbDG6fl/l30h3lpjEO/kdUqoa9 EV0YmaOogVGvkYNv34MWIuxzv2/xmksVmI0BkLZdwmCedyNxT0EbWCMWiVuLGWmKjzWR2+nC/Rl GMcU2edNft3AKorocYXFwppIFUQk= X-Google-Smtp-Source: AGHT+IHIdfhxM/rXghbVDGYo0nWOoNzu2WI5m7sP1LXtf23AfBrUN6Yhc0vmT4nLq4PorripH9j+mWL8icagkKETL08= X-Received: by 2002:a05:6102:dd3:b0:4ad:4ce6:709 with SMTP id ada2fe7eead31-4ad4ce607a4mr5902578137.6.1731590735797; Thu, 14 Nov 2024 05:25:35 -0800 (PST) In-Reply-To: <87msi23vyb.fsf@pengjiz.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295331 Archived-At: --000000000000b427f30626df6270 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Not sure this is 100% relevant to the discussion, but -Q also implies --no-site-file which inhibits site-start.el. This will interfere with Emacs builds such as https://github.com/jimeh/emacs-builds for macOS. They rely on site-start to establish bundled native compiler runtime dependencies. Running a flymake batch without those dependencies may have unintended flymake performance implications. On Thu, Nov 14, 2024 at 6:19=E2=80=AFAM Pengji Zhang wrote= : > Spencer Baugh writes: > > > I think this should also switch from passing "-Q" to passing just > > "-q". If we're include ~/.emacs.d/elpa on load-path, we should include > > the site-lisp directories too, which -Q suppresses. > > I agree. How about the following change? > > --8<---------------cut here---------------start------------->8--- > :name "elisp-flymake-byte-compile" > :buffer output-buffer > :command `(,(expand-file-name invocation-name > invocation-directory) > - "-Q" > + ,@(if elisp-flymake--byte-compile-activate-packages > + ;; Add site-lisp directories to `load-path' so > + ;; that system-wide packages (installed into > + ;; site-lisp/elpa) are activated. > + '("-q" "--no-site-file") > + '("-Q")) > "--batch" > ;; "--eval" "(setq load-prefer-newer t)" ; for testin= g > ,@(mapcan (lambda (path) (list "-L" path)) > --8<---------------cut here---------------end--------------->8--- > > > Probably we should specifically pass "--batch --no-site-file" instead > > of "-Q --batch", since --batch also implies -q. > > I am not sure if it is a good idea to always include the site-lisp > directories. I myself want this only when checking my init.el. When > developing packages, I prefer a pristine environment. > > > > --000000000000b427f30626df6270 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Not sure this is 100% relevant to the discussion, but -Q also implies --= no-site-file which inhibits site-start.el. This will interfere with Emacs b= uilds such as https://git= hub.com/jimeh/emacs-builds=C2=A0for macOS. They rely=C2=A0on site-start= to establish bundled native compiler runtime dependencies. Running a flyma= ke batch without those dependencies may=C2=A0have unintended flymake perfor= mance implications.

On Thu, Nov 14, 2024 at 6:19=E2=80=AFAM Pengji Zha= ng <me@pengjiz.com> wrote:
<= /div>
Spencer Baugh <sbaugh@janestreet.= com> writes:

> I think this should also switch from passing "-Q" to passing= just
> "-q". If we're include ~/.emacs.d/elpa on load-path, we = should include
> the site-lisp directories too, which -Q suppresses.

I agree. How about the following change?

--8<---------------cut here---------------start------------->8---
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:name "elisp-flymake-byte-compile&qu= ot;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:buffer output-buffer
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:command `(,(expand-file-name invocation-= name invocation-directory)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"= ;-Q"
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0,@(if= elisp-flymake--byte-compile-activate-packages
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0;; Add site-lisp directories to `load-path' so
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0;; that system-wide packages (installed into
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0;; site-lisp/elpa) are activated.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0'("-q" "--no-site-file")
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0'("-Q"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "= ;--batch"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; &q= uot;--eval" "(setq load-prefer-newer t)" ; for testing
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ,@(ma= pcan (lambda (path) (list "-L" path))
--8<---------------cut here---------------end--------------->8---

> Probably we should specifically pass "--batch --no-site-file"= ; instead
> of "-Q --batch", since --batch also implies -q.

I am not sure if it is a good idea to always include the site-lisp
directories. I myself want this only when checking my init.el. When
developing packages, I prefer a pristine environment.



--000000000000b427f30626df6270--