From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62762: Incremental builds and Lisp files dependencies pulling a new version of the code Date: Sun, 07 May 2023 08:34:38 +0300 Message-ID: <83y1m0emc1.fsf@gnu.org> References: <17b74a48-94e1-9106-cc79-d31972313910@gutov.dev> <837cujaqzq.fsf@gnu.org> <87wn2ilwed.fsf@localhost> <83zg7ealrd.fsf@gnu.org> <87pm8a8dx4.fsf@localhost> <87pm7vt0mx.fsf@localhost> <87cz3k8i27.fsf@localhost> <87sfcfdldt.fsf@localhost> <87bkj1g10g.fsf@localhost> <1c5d0ff0-5bae-1123-d2f7-64d9013fbc0f@gmail.com> <6070e598-7dee-1b7a-7f97-26a90618cb7a@gmail.com> <1f236996-5f17-3be8-d01c-803e065985f7@gmail.com> <83h6sphp82.fsf@gnu.org> <0d716705-bea1-4cb3-afbc-c381a7519b12@gmail.com> <83fs89fmtj.fsf@gnu.org> <3d9869dc-8cac-e076-ba7e-def76bfc587c@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32075"; mail-complaints-to="usenet@ciao.gmane.io" Cc: yantar92@posteo.net, 62762@debbugs.gnu.org, bzg@gnu.org, dmitry@gutov.dev, monnier@iro.umontreal.ca, acm@muc.de To: Max Nikulin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 07 07:34:20 2023 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 1pvX2J-00085M-Io for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 May 2023 07:34:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pvX25-000055-KS; Sun, 07 May 2023 01:34:05 -0400 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 1pvX22-0008WM-W1 for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 01:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pvX22-00079z-NW for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 01:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pvX22-0005zH-K0 for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 01:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 May 2023 05:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62762 X-GNU-PR-Package: emacs Original-Received: via spool by 62762-submit@debbugs.gnu.org id=B62762.168343763222996 (code B ref 62762); Sun, 07 May 2023 05:34:02 +0000 Original-Received: (at 62762) by debbugs.gnu.org; 7 May 2023 05:33:52 +0000 Original-Received: from localhost ([127.0.0.1]:36191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvX1s-0005yq-B2 for submit@debbugs.gnu.org; Sun, 07 May 2023 01:33:52 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvX1q-0005yb-2a for 62762@debbugs.gnu.org; Sun, 07 May 2023 01:33:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvX1i-00078P-OV; Sun, 07 May 2023 01:33:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=vzewGUFcMnQ3WahvzNEqUs3fWL88MqDn4lqcT9AJIEw=; b=RQ+PplYe0feV rBYOvUguLN68Cy6pmYVi2ApR9fa5gQr6BGOJDs4ehD7BB9yuM0oXusxmAEKPIvkcq0HZuCfCAUkIS FuRJ7ufQe2TepSywYAer+0FqnjfQ6POtU8g3FsDje5FQOadbyjS1HjylVfZrnwW+h7FWdo9kFppFD vZ5+DbQgC2kixOGMpp6mRukpf6N55Q2u2BoGuWZIcPydEAC7gFsEsUmQzwbdMlKBQiCGy4VWPHZtK d9jHONOWpPi57CRFpR/YsMgavJz1JBLpd5LuSB16Op3o0rB1KjdKeWnvZJ502SYv4ovcsM6/8Txvj y+KUXZf3LUxAJzVQD64McA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvX1i-0007tR-4d; Sun, 07 May 2023 01:33:42 -0400 In-Reply-To: <3d9869dc-8cac-e076-ba7e-def76bfc587c@gmail.com> (message from Max Nikulin on Sun, 7 May 2023 09:45:20 +0700) 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:261232 Archived-At: > Date: Sun, 7 May 2023 09:45:20 +0700 > Cc: monnier@iro.umontreal.ca, yantar92@posteo.net, bzg@gnu.org, > dmitry@gutov.dev, 62762@debbugs.gnu.org, acm@muc.de > From: Max Nikulin > > On 06/05/2023 23:26, Eli Zaretskii wrote: > >> Date: Sat, 6 May 2023 22:50:22 +0700 From: Max Nikulin > >> > > No, I mean that the order in which Make builds the targets might not > > be what you think, if all you tell it that all org/*.elc files depend > > on org-macs.elc. > > Sorry, but it is still not clear to we what "doesn't really work" and I > feel that it may be important for further discussion. > > If a Makefile contains a dependency like > > org/ol.elc: org/org-macs.elc > > and org/org-macs.elc needs update then the rule for org/ol.elc is > executed after completion of the rule for org/org-macs.elc. The purpose > of dependencies is to define order of execution of build rules. My point was that with the above rule, if org-macs.elc doesn't exist, Make will want to produce it, even though for your purposes there's no reason to do that. > However I suggested dependencies on org-macs.el, not on org-macs.elc: > > Sat, 6 May 2023 13:00:38 +0700 > >> they > >> should be at least that all lisp/org/*.elc files depend on > >> lisp/org/org-version.el and lisp/org/org-macs.el. I don't really understand in enough detail what is it that you are suggesting, because you show your suggestion piecemeal. Can you describe the suggestion in its entirety, top to bottom, including all the details? In particular, since the proposed automatic dependency generation will be side effect of byte-compilation (right?), how do you make sure the compilation is in the correct order when dependencies change due to changes in the source *.el files? Please also consider parallel builds, something that almost all of the Emacs developers use all the time. Thus, if N files depend on foo.el, when foo.el changes Make will want to run N parallel jobs compiling each one of the N dependencies. In addition, some of the *.el files are generated, so they change as result of changes in other *.el files. AFAIK, automatic dependency generation doesn't usually deal with such cases, it only deals with dependencies on files that are not regenerated as part of the build. How do you suggest to handle this? And finally, some of the Lisp files are preloaded, so their changes, and the changes in their *.elc files as result of changes in their prerequisites, affect the Emacs binary that is used to byte-compile the Lisp files. If the preloaded files are outdated, many compilations might fail just because of this aspect. If you have an idea for solving all of these problems (which are really just the initial tips of the iceberg), please describe your idea with all of its details. Otherwise, this discussion is not really useful.