From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Max Nikulin Newsgroups: gmane.emacs.bugs Subject: bug#62762: circular dependencies in elisp files and make Date: Sat, 13 May 2023 14:34:06 +0700 Message-ID: <16f3f59c-ce2c-2b0d-fe56-8a85b79a1b3f@gmail.com> References: <17b74a48-94e1-9106-cc79-d31972313910@gutov.dev> <87sfcfdldt.fsf@localhost> <87bkj1g10g.fsf@localhost> <1c5d0ff0-5bae-1123-d2f7-64d9013fbc0f@gmail.com> <6070e598-7dee-1b7a-7f97-26a90618cb7a@gmail.com> <64a61548-e343-992f-d193-d8ff4fe0623b@gmail.com> <831qjvjmw5.fsf@gnu.org> <48f15926-d002-877b-1d01-3a607fe42b76@gmail.com> <83v8h7hxlj.fsf@gnu.org> <38c89611-a929-1869-e70d-983bd7edad14@gmail.com> <83jzxnhv2o.fsf@gnu.org> <59ccf87f-effb-2168-2c17-34d950060b1b@gmail.com> <83354aixqy.fsf@gnu.org> <3ce7d18d-8190-a379-f503-5b0fef1dcb88@gmail.com> <831qjuisa4.fsf@gnu.org> <83y1lu505p.fsf@gnu.org> <9d8db5af-1917-1d0a-0360-ac122e137a53@gmail.com> <83ttwhbn7b.fsf@gnu.org> <9aa7edb6-c6c4-39ad-4302-371e5e58b4f6@gmail.com> <83sfc1bkt3.fsf@gnu.org> <83zg68afn9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21508"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Cc: yantar92@posteo.net, 62762@debbugs.gnu.org, bzg@gnu.org, dmitry@gutov.dev, monnier@iro.umontreal.ca, acm@muc.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 13 09:35:15 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 1pxjmc-0005U7-IF for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 May 2023 09:35:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxjmS-000421-IS; Sat, 13 May 2023 03:35:04 -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 1pxjmQ-00041j-D7 for bug-gnu-emacs@gnu.org; Sat, 13 May 2023 03:35:02 -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 1pxjmQ-0007Tx-4d for bug-gnu-emacs@gnu.org; Sat, 13 May 2023 03:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pxjmP-00036G-Rj for bug-gnu-emacs@gnu.org; Sat, 13 May 2023 03:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Max Nikulin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 May 2023 07:35:01 +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.168396325711817 (code B ref 62762); Sat, 13 May 2023 07:35:01 +0000 Original-Received: (at 62762) by debbugs.gnu.org; 13 May 2023 07:34:17 +0000 Original-Received: from localhost ([127.0.0.1]:35669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxjlg-00034X-OC for submit@debbugs.gnu.org; Sat, 13 May 2023 03:34:17 -0400 Original-Received: from mail-lj1-f178.google.com ([209.85.208.178]:48627) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxjlf-00034F-8o for 62762@debbugs.gnu.org; Sat, 13 May 2023 03:34:15 -0400 Original-Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2ac82b07eb3so110400351fa.1 for <62762@debbugs.gnu.org>; Sat, 13 May 2023 00:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683963249; x=1686555249; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=ApRcU211h3L8ZtBkw5eBWnnPSdc4s0QKFQrK75/WBsE=; b=k/dWQzjtBiU69ADoz702muHcAF69jaVic7rUuzzF0wapl3ssSh7Cuk8cymKkxX4qFn qhwvx905HBDLdREZNWF90mYcwocm4ZaWr+F6Oi6siuWvG936lLyQteGOGtw4VcCQxo30 kamdTPxvNCSSIpbIeK7muckDHuoHJ6mtsDjg90In1GfU2aSbEoiDX5UbyzVn3rKb0wpM G1HM/WSWcaywHSFCWJIlV34lcAm2/erb9ahVriJTHyg+j5FHLYugh0x8//OtW5o6oIuH t1SvlPMmY2lEKxUqzW5jeenPy3I6i+1XYCypI+EnoTFD3Ph9T4iTyuHYSHJaK3myBQcc Ij7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683963249; x=1686555249; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ApRcU211h3L8ZtBkw5eBWnnPSdc4s0QKFQrK75/WBsE=; b=JBZaxeVWS0LIBP03GQqtHmtX2b3qNGmlUMdXToFT/usBYqYexSHT4ythNKsUybGex6 Vmf5wJq+AX0CBbucL/BZBkxQB4Cqt/nTsGHSZp6BQ4G6SfylJVCfAYXkZt25UFynU0hI STURp2rsB8CnueGjvED80SSQo5280b6oERvuOSGjSrAWDkwzsI9uUaHGzXNbHV9x2Sqk WlRgHChj7vswaFx72RS6Hwsf1DszhYy/txdZLhJPycKk4GvSnBNcrWgl/a7b5nIpC0lc aDxit+iPkWuAP5k2IsjOGJQvWwZ8GKg/yyRKsahqXIqbCqhAhBYXgtxK0fQzZu44Rv4v obEA== X-Gm-Message-State: AC+VfDxkMLlidgqMLIncBHLijbjOUVtsuTvUdXPiYY8tTa5rfgIOO1ja QnqTx30X/IbRwhg9KoRHA0M= X-Google-Smtp-Source: ACHHUZ7ngRyxTBPk6lQdaT089oKCYvbYM3oa/XcC4hgpWOVR86XetR2XPn998X4p4/mxeriB6Cx9Lw== X-Received: by 2002:a2e:9d4c:0:b0:2ad:a213:269c with SMTP id y12-20020a2e9d4c000000b002ada213269cmr4058962ljj.5.1683963249038; Sat, 13 May 2023 00:34:09 -0700 (PDT) Original-Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id v3-20020ac25583000000b004f143c11cbcsm1728160lfg.51.2023.05.13.00.34.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 13 May 2023 00:34:08 -0700 (PDT) Content-Language: en-US In-Reply-To: <83zg68afn9.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:261670 Archived-At: On 13/05/2023 13:50, Eli Zaretskii wrote: >> Date: Sat, 13 May 2023 10:08:25 +0700 From: Max Nikulin >> >> ... What >> can be better is removing all stale .elc file before compiling of >> updates sources. A script iterates over dependency files and deletes >> .elc if any its prerequisite has been updated. Following compilation >> pass can safely use .elc files that are either survived from previous >> build as up to date or just refreshed. > > So you will make each build always do two byte-compilation passes > where today we have just one? And the first one of these will use > only *.el files, including for those that are preloaded into > bootstrap-emacs? Doesn't that sound like a significant slow-down of > the build? I do not see a reason for significant slow-down because I do not suggest two passes of *byte-compilataion*. 1. A script reads dependency files (if they exist) created during previous build and removes stale .elc files. 2. Normal "make" pass that takes into account dependency between files for ordering of compile commands. Dependency files are created or updated as a side-effect of compilation. Likely it is reasonable to split stage 2 into steps similar to current targets like main-first and mark most of files as dependent on a target that (throw its dependencies) compiles files required for byte compilation.