From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tom Gillespie Newsgroups: gmane.emacs.bugs Subject: bug#43476: feature/native-comp; path for .eln files when running with --no-init-file Date: Thu, 17 Sep 2020 14:03:39 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13152"; mail-complaints-to="usenet@ciao.gmane.io" To: 43476@debbugs.gnu.org, akrl@sdf.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 17 20:06:22 2020 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 1kIyIY-0003Hm-Ip for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Sep 2020 20:06:22 +0200 Original-Received: from localhost ([::1]:59322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIyIX-0004HK-Hr for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Sep 2020 14:06:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIyGI-00031e-UW for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 14:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55667) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIyGI-0006Bd-Ic for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 14:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kIyGI-0004Cg-FA for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 14:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tom Gillespie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Sep 2020 18:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43476 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Emacs Bug Report , Andrea Corallo Original-Received: via spool by submit@debbugs.gnu.org id=B.160036584116149 (code B ref -1); Thu, 17 Sep 2020 18:04:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Sep 2020 18:04:01 +0000 Original-Received: from localhost ([127.0.0.1]:38980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyGD-0004CL-Iu for submit@debbugs.gnu.org; Thu, 17 Sep 2020 14:04:00 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:51118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyGC-0004CD-30 for submit@debbugs.gnu.org; Thu, 17 Sep 2020 14:03:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIyGB-0002sO-RA for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 14:03:55 -0400 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:44669) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIyGA-0006B3-1W for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 14:03:55 -0400 Original-Received: by mail-wr1-x42e.google.com with SMTP id s12so3021752wrw.11 for ; Thu, 17 Sep 2020 11:03:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=z5UR8XFvIuOY2sVrYJyCWYdRmsD2nLjnaTIsQu+VJcU=; b=VSKTaQkkReCmEnOV3RaybuOwfhYMgKVmnLaRXeZIW6P7+smjydgDdAbnCiyr1PB71Z IpLkGWpnZHO8rHov4FANuRIqHBZrK8eDUY4DW3SXh7IWxLqvKGMaS0vWczncr2NbNQr7 lZcnYqzkqc6yyVer2sZ7JIUberFKYCr2gQq+SFvCdnZvoIvQlY9Vz8w+KvoOUh0sROqD Tz8QIzGVTEx/M6eRoDosjrwpaWoHaO7an6CXUOM4JAHWHbEB++4XdqICsng25qw/13Sc GZmmcyG/cTrNKnZ7DyXM7fkEIESAQdFHTPPpy/G8KLHrV46rG0BnbrbEzdkBLXezE7kS DCUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=z5UR8XFvIuOY2sVrYJyCWYdRmsD2nLjnaTIsQu+VJcU=; b=PNfmF2cm4/1y00UQbtBHsYRQYDP+/zbmyHVYq0KpAzidRt49u+DDUQgWc9PF/UM+Zg VjpetGl0+dmmJnuUdUZHN7PeODF3XHV974wtkiv38tH0T9GqASX1mP+MUBup3k6Mw+Wb wZB3hVFbPlm8iVcRGu7hSb36PF4oKxThWGa7PqTUF/gu7FnwvZUT88U3+WpDRPB/ySmG oSytSfvpVJKAZ7rini4vvH0DQB6jtjwPB4kBhmYVZisNKjOOB9j55YJhfSqjWerozh8c j1SeSNcj8vzP7AaSKHooMvTl2JZJgLPM3bq4hchljdqgjNYALAI0yoWXJy2lFnw/GNQp j6Kg== X-Gm-Message-State: AOAM531sIUJzMwmqsjmMGE0fGske1ay4VjQhrChNnVkARSWpxpfquxEC EuFKekC2H7c6jDurd2Tb3cniQ5DltaTNfDJXYzlOXxn8zvE1ig== X-Google-Smtp-Source: ABdhPJyyCjRNxDtt5QIe3C6X1WlVIh1j6TRf8zB6zSJOyHWmVte8LHwXLl+7EPriaItahKuccOR1o+f4bb1rxA9ncS8= X-Received: by 2002:adf:fc92:: with SMTP id g18mr35857365wrr.201.1600365830919; Thu, 17 Sep 2020 11:03:50 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=tgbugs@gmail.com; helo=mail-wr1-x42e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 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" Xref: news.gmane.io gmane.emacs.bugs:188239 Archived-At: Hi Andrea, Not quite a bug, but an inconsistency in the behavior of comp-eln-load-path compared to the behavior of load-path. Best! Tom While investigating the json-mode kill-buffer bug I encountered an issue which seems like it might cause confusion at some point. comp-eln-load-path is set at startup and materialized. When Emacs is launched with -q, load-path does not contain the materialized locations of paths inside user-emacs-directory until after a call to package-initialize. I think that there is a similar need for comp-eln-load-path, which is that it needs to exclude the user eln cache path when emacs is launched with -q so that it is possible to debug issues arising from stale/bad eln files. There will be a similar issue with site-lisp and -Q. I don't know whether stale files could cause a problem given how you hash to generate the names for the eln files, but I'm imagining cases where someone upgraded gcc or libgccjit and something changed. I think that not setting the user path when Emacs is run with -q is consistent with Emacs behavior for load-path. Right now a user has to explicitly pop the old eln cache directory and then update the new directory if they reset user-emacs-directory as I do in the longer reproduction for the json-mode bug (reproduced below). #+begin_src bash emacs -q \ --eval "(setq user-emacs-directory \"/tmp/test/.emacs.d/\")" \ --eval "(when (boundp 'comp-eln-load-path) (pop comp-eln-load-path) (add-to-list 'comp-eln-load-path (concat user-emacs-directory \"eln-cache\")))" #+end_src I don't have a good solution for this, but wanted to raise the issue since I anticipate that there will be quite a bit of confusion if the user eln cache continues to point to the path ~/.emacs.d/eln-cache instead of either not being set or updating to be inside user-emacs-directory the first time the value is needed.