From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#46617: 28.0.50; nativecomp: native compile cache is not invalidated when file is re-byte compiled and changes Date: Mon, 29 Mar 2021 08:14:55 +0000 Message-ID: References: Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11299"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Andrew Whatson , 46617@debbugs.gnu.org To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 29 10:16:12 2021 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 1lQn4F-0002lV-Dc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Mar 2021 10:16:11 +0200 Original-Received: from localhost ([::1]:53058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQn4E-00068B-DZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Mar 2021 04:16:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQn46-000677-2i for bug-gnu-emacs@gnu.org; Mon, 29 Mar 2021 04:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36219) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQn45-0007I5-QP for bug-gnu-emacs@gnu.org; Mon, 29 Mar 2021 04:16:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQn45-0005Io-MJ for bug-gnu-emacs@gnu.org; Mon, 29 Mar 2021 04:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Mar 2021 08:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46617 X-GNU-PR-Package: emacs Original-Received: via spool by 46617-submit@debbugs.gnu.org id=B46617.161700570220285 (code B ref 46617); Mon, 29 Mar 2021 08:16:01 +0000 Original-Received: (at 46617) by debbugs.gnu.org; 29 Mar 2021 08:15:02 +0000 Original-Received: from localhost ([127.0.0.1]:47763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQn37-0005Gy-Db for submit@debbugs.gnu.org; Mon, 29 Mar 2021 04:15:02 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:55919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQn35-0005Gd-2n for 46617@debbugs.gnu.org; Mon, 29 Mar 2021 04:14:59 -0400 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 12T8Etbl005395 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Mon, 29 Mar 2021 08:14:55 GMT In-Reply-To: (Aaron Jensen's message of "Sun, 28 Mar 2021 13:24:49 -0500") 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:203222 Archived-At: Aaron Jensen writes: > On Fri, Mar 26, 2021 at 2:54 AM Andrea Corallo wrote: >> >> Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of >> text editors" writes: >> >> > Aaron Jensen writes: >> > >> >> On Sun, Mar 21, 2021 at 3:54 PM Andrea Corallo wrote: >> >>> >> >>> Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of >> >>> text editors" writes: >> >>> >> >>> >> >>> Okay I've added `comp-lookup-eln' son now the user can search if a >> >>> certain .eln is in reach in `comp-eln-load-path' for a given .el. >> >>> >> >>> So now one can use the following to force a native load. >> >>> >> >>> (load (comp-lookup-eln ".../foo.el")) >> >> >> >> Okay, and that would return nil if it's not native compiled, which >> >> would be their cue to native compile it, yes? >> > >> > Yes `comp-lookup-eln' will return nil if the eln is not found. >> > >> >> That's nice to be able >> >> to force load it. >> >> >> >> Without doing the modification date stuff you mentioned or purge >> >> before byte compile, native compilation ends up having to be a concern >> >> of anything that's doing byte compiling, which is unfortunate. >> > >> > Say anything that's doing byte compiling deliberately capturing >> > environment values yes. >> > >> > Andrea >> >> I've reintroduced the file timestamp check on the eln files being loaded >> with 79b8b6ca45. This should protect us from loading stale eln that >> captured some stale env during compilation. > > What does it compare the timestamp of the eln to? It doesn't appear > that it's the elc, which I believe is the only thing that would help > with the issue we're seeing in straight.el. Is it the el or something > else? Compares against the .elc. > A related issue I've found is that now when you load an elc > explicitly, it triggers a native compile for that file regardless of > whether or not one has already been done. Do you have a reproducer I can look at? > One general question is, is the eln a compilation of the elc or the > el? Native compilation uses as input always the source (.el) file. Thanks Andrea