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: Wed, 31 Mar 2021 10:22:29 +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="16605"; 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 Wed Mar 31 12:23:29 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 1lRY0X-0004Bg-Bp for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Mar 2021 12:23:29 +0200 Original-Received: from localhost ([::1]:36222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRY0W-00037n-BP for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Mar 2021 06:23:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRY06-00037c-QK for bug-gnu-emacs@gnu.org; Wed, 31 Mar 2021 06:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41989) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRY06-00039J-IQ for bug-gnu-emacs@gnu.org; Wed, 31 Mar 2021 06:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRY06-0004H0-Eg for bug-gnu-emacs@gnu.org; Wed, 31 Mar 2021 06:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Mar 2021 10:23:02 +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.161718615316375 (code B ref 46617); Wed, 31 Mar 2021 10:23:02 +0000 Original-Received: (at 46617) by debbugs.gnu.org; 31 Mar 2021 10:22:33 +0000 Original-Received: from localhost ([127.0.0.1]:53535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRXzc-0004G2-MA for submit@debbugs.gnu.org; Wed, 31 Mar 2021 06:22:32 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:64847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRXza-0004Fu-F5 for 46617@debbugs.gnu.org; Wed, 31 Mar 2021 06:22:31 -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 12VAMTbw022728 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Wed, 31 Mar 2021 10:22:29 GMT In-Reply-To: (Aaron Jensen's message of "Mon, 29 Mar 2021 11:26:39 -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:203342 Archived-At: Aaron Jensen writes: > On Mon, Mar 29, 2021 at 3:15 AM Andrea Corallo wrote: >> Compares against the .elc. > > For some reason, I do not see this behavior. Touching the elc files > and restarting does not trigger a recompile of the elns. That's odd, I do. >> Do you have a reproducer I can look at? > > Yes, you can follow straight.el's installation instructions. Create a > new .emacs.d/init.el with: > > (defvar bootstrap-version) > (let ((bootstrap-file > (expand-file-name "straight/repos/straight.el/bootstrap.el" > user-emacs-directory)) > (bootstrap-version 5)) > (unless (file-exists-p bootstrap-file) > (with-current-buffer > (url-retrieve-synchronously > "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" > 'silent 'inhibit-cookies) > (goto-char (point-max)) > (eval-print-last-sexp))) > (load bootstrap-file nil 'nomessage)) > > Load emacs, let it install straight and do all native compilation. > > Restart emacs. It will recompile straight.el every time you restart. > > It will also recompile every time you do: > > (load "~/.emacs.d/straight/repos/straight.el/straight.elc" nil > 'nomessage 'nosuffix) > > One thing of note here is that because of the way straight works there > ends up being two straight.elc files. One in straight/build/straight > and another in straight/repos/straight.el. The former has a > straight.el that symlinks to the latter, but the straight.elcs are > both concrete. Okay I think I see what's the issue. We have changed the `load' semantinc and now when the a .elc file is explicitly requested for load we do not load the .eln even if present. But at this point we don't have to trigger the native compilation for that file. I'll come-up with a fix. Thanks Andrea