From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#74382: `compile-first` Make rule is no longer using `load-prefer-newer` Date: Sun, 17 Nov 2024 18:31:38 +0300 Message-ID: <16787fc6f6933aa596427f420319e87d86dac9b0.camel@yandex.ru> References: <6bc3a410f0857c3e3433070ac19deaf7eae88c63.camel@yandex.ru> <86o72ff2h0.fsf@gnu.org> <2b134414542a4af7b87435099570fd88c7d25aa6.camel@yandex.ru> <86y11jvthj.fsf@gnu.org> <46a8bf630b89755bd6edc1521390352ecc176881.camel@yandex.ru> <86jzd2we9h.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34697"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.54.1 Cc: acm@muc.de, 74382@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 17 16:32:11 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 1tChFz-0008ty-Eb for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Nov 2024 16:32:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tChFs-00046p-L1; Sun, 17 Nov 2024 10:32:04 -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 1tChFr-00046e-1G for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2024 10:32: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 1tChFq-0003Vj-I2 for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2024 10:32:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=JVt6c2cc09zEKM95smJW96wcO5n92H8NXGM4YXb5834=; b=QLJd6g6c2bCTtHlBt9DvHF7Z2zUw22oHnWjxiyGTc5GfWevmRmgXTYaYkRTKSULo3ah+DvJLO5TxY6roi4csB2s+OxiLF7CfHbwmjfT2mjgFQXh3vwHgJu7PJCrvUXH0odq4lhHkdYGZOhPOzZk08rpP/N0pnhiN3NxoE0S4qTPKPKGPqf9kHAcVb3GQVpld2k2CdOxs5YbmffoGh2KItAQE0F0XjyGKB6Q0sOOQO4Nnj65stsFjDqaLSKzNR9cJ5f0mKODdjHr+OVnlIikKiKL5ilQt+74P7C05FeCVFNlAt2zLnQUhEsDDPYkOtd2pE+9XGzN8/4ewkWZvXeO9HA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tChFq-0007vr-Cy for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2024 10:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Nov 2024 15:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74382 X-GNU-PR-Package: emacs Original-Received: via spool by 74382-submit@debbugs.gnu.org id=B74382.173185751030466 (code B ref 74382); Sun, 17 Nov 2024 15:32:02 +0000 Original-Received: (at 74382) by debbugs.gnu.org; 17 Nov 2024 15:31:50 +0000 Original-Received: from localhost ([127.0.0.1]:58113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tChFd-0007vH-3s for submit@debbugs.gnu.org; Sun, 17 Nov 2024 10:31:50 -0500 Original-Received: from forward500d.mail.yandex.net ([178.154.239.208]:43894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tChFa-0007uv-PJ for 74382@debbugs.gnu.org; Sun, 17 Nov 2024 10:31:48 -0500 Original-Received: from mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net [IPv6:2a02:6b8:c42:96c7:0:640:6549:0]) by forward500d.mail.yandex.net (Yandex) with ESMTPS id 64DB360E0A; Sun, 17 Nov 2024 18:31:40 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id cVRntXTOciE0-jvxhiRg5; Sun, 17 Nov 2024 18:31:39 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1731857499; bh=JVt6c2cc09zEKM95smJW96wcO5n92H8NXGM4YXb5834=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=o0Eon7QrOosZZkrIV+Y8TcKb5WblaJOaqNuRss1b8YHpiYuFAVE3FMIe4s0hQzZSq 3fqWD4MTiLXmPIo1qLnK/pxgNYrrYuARV/ro4Cw2xlH++VwI7aSpZE+/OVN26eztnB cxP96PJIxgVq+slS8dAZem1Sds1I3DBTK4atpGok= Authentication-Results: mail-nwsmtp-smtp-production-main-39.klg.yp-c.yandex.net; dkim=pass header.i=@yandex.ru In-Reply-To: <86jzd2we9h.fsf@gnu.org> 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:295532 Archived-At: On Sun, 2024-11-17 at 08:44 +0200, Eli Zaretskii wrote: > > From: Konstantin Kharlamov > > Cc: acm@muc.de, 74382@debbugs.gnu.org > > Date: Sun, 17 Nov 2024 01:54:48 +0300 > >=20 > > > It's impractical, because we have many files with macros.=C2=A0 > > > Tracking > > > all of those dependencies would mean that changes in any file > > > will > > > trigger unnecessary recompilation of many other files.=C2=A0 If you > > > don't > > > mind spending that time waiting for the build, just "make > > > bootstrap" > > > every time you update from Git, and you will have that. > >=20 > > Unless I'm missing something, the problem seems to be with one > > exact > > file, macroexpand.elc, and not with others. >=20 > No, that's not true.=C2=A0 I had similar problems with basically all the > files in COMPILE_FIRST. >=20 > More importantly, what you seem to be missing is that we deliberately > play with the time stamps of the *.elc files in COMPILE_FIRST (search > for "UTC" in the Makefile), so we must not use load-prefer-newer in > this case.=C2=A0 That is the reason why it's removed from > BYTE_COMPILE_FLAGS. >=20 > > So the algorithm is simple: if `macroexpand.el` was modified, > > remove > > its elc file. You don't need to track any dependencies. >=20 > How will load-prefer-newer help if this is what you do?=C2=A0 That's the > trigger for this bug report, no? >=20 > In any case, this is not the reason why load-prefer-newer is removed > while we COMPILE_FIRST; see above. Alright, for more efficient discussion I think I need to dig into how this all work in different situations and measure performance, to come up with some suggestions, but I'm afraid ATM I just don't have the spare time, so maybe let's close the discussion for now=E2=80=A6 I just see that COMPILE_FIRST files should never be used while being stale, but for performance reasons they are used stale. I don't think this is the case where the correctness can be traded off for performance, but it's just my opinion.