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 10:08:25 +0700 Message-ID: References: <17b74a48-94e1-9106-cc79-d31972313910@gutov.dev> <87cz3k8i27.fsf@localhost> <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> 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="4322"; 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 05:09:30 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 1pxfdR-0000xt-S7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 May 2023 05:09:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxfd3-0004bl-FD; Fri, 12 May 2023 23:09: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 1pxfd0-0004bU-7b for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 23:09: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 1pxfcz-00015o-Vl for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 23:09:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pxfcz-00015a-Rg for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 23:09: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 03:09: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.16839473154148 (code B ref 62762); Sat, 13 May 2023 03:09:01 +0000 Original-Received: (at 62762) by debbugs.gnu.org; 13 May 2023 03:08:35 +0000 Original-Received: from localhost ([127.0.0.1]:34702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxfcZ-00014p-Dq for submit@debbugs.gnu.org; Fri, 12 May 2023 23:08:35 -0400 Original-Received: from mail-lf1-f51.google.com ([209.85.167.51]:56334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxfcX-00014c-Qj for 62762@debbugs.gnu.org; Fri, 12 May 2023 23:08:34 -0400 Original-Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-4f13a72ff53so11958970e87.0 for <62762@debbugs.gnu.org>; Fri, 12 May 2023 20:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683947308; x=1686539308; 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=FM7fbmFPdw4uJjj2uXFxi1LHW8PfgU0ecwraThaLXvg=; b=Z/BwH04HNWqXyWt15WhZ7ln9FhzFvyY0DG6uiBGx/qJ82xU7bg7T0Bt8w/R8Vsv5WT 2k0XI0AK2ammyH0II9fuJRthEWPsgAr6zgM3hlekb+w+6pB2QlsGMGwztX8rPJm1Tlue +F8spf28dHZbAx2MhXc+GWMx4g7CdYelg0MYCljfb8TzcqUt7lCqUxhoybSWi9JhYyAH +CeBWkogDrXyofq9KvFLJ+s/wTO2hCJu3jMYGxY/4s9CwCVj+oIvoOLxx4I551pa93ST EF8BiTRZGNlpN57bhIEn3+y821DJnKh1+M35YACxiRSkFI1xl7d6HScyvb+tfkeAR315 1S7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683947308; x=1686539308; 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=FM7fbmFPdw4uJjj2uXFxi1LHW8PfgU0ecwraThaLXvg=; b=VSlz1Re4NJSY8C3h/68CPxr8rue25I4pryK8xkSkI3xS5nYXG4Je4DlKKNNvcD56ow j0u3Kyf9Dzbr6657qJ7RmAQfdZxnFQFPEErDYTMtIP8gnOYu7zRaXujeOaWw3fUPTosN o1quUHyrKE0371L4dbfbT/8iu3TqZBQRJEjAwtzz/DieRszmRk5zdI8t0Sm2z8EW9IxF 5Kc7LLOafSGAp2g7G8eOYyZs2mHucq1IkFT082K2lbTtG8veq18y1G43HkP4K4Fgl5Zz P9csRGa7cij0Ztg8skYYwBIFaE/DppJ/veadUBDs+EoiycUUxuR48hj0O3poSeLnNt44 PmDA== X-Gm-Message-State: AC+VfDyGr4Sewu10XXn4gt9XBJ72JLTkMiWxC2i8526cg01ub6+u3X56 2AnA07Ljp9dOlW8cD/AZJu0= X-Google-Smtp-Source: ACHHUZ6a9qfK7MnJ4MqpLCE/MZ4EzaTEGusJ9XkwQwg64CtFSGt8jNOe7LrcGlV6pymU0ABNIGRKjQ== X-Received: by 2002:a05:6512:3c9:b0:4ed:c64c:37b with SMTP id w9-20020a05651203c900b004edc64c037bmr3859121lfp.62.1683947307451; Fri, 12 May 2023 20:08:27 -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 m25-20020ac24259000000b004f13ca69dc8sm1673141lfl.72.2023.05.12.20.08.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 May 2023 20:08:27 -0700 (PDT) Content-Language: en-US In-Reply-To: <83sfc1bkt3.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:261655 Archived-At: On 12/05/2023 23:01, Eli Zaretskii wrote: >> Date: Fri, 12 May 2023 22:26:47 +0700 From: Max Nikulin >> >> I expect that >> >> emacs -Q --batch -l bytecomp --eval \ >> "(mapc (lambda (x) (princ (car x) (terpri))) load-history)" >> >> gives reasonable approximation to "files necessary to load bytecomp". >> What should be added to prerequisites besides bytecomp dependencies? > > Anything that bytecomp loads via autoloads while compiling. Also > byte-opt and its autoloads, I think. You are right concerning autoloads, while byte-opt is just one extra file in the dependency list. However the same expression evaluated when `batch-byte-compile' call finished gives list of dependencies for the just created .elc files. Basic statistics based on dependency files may provide better approximation which files should be compiled at first to achieve faster build. I do not think that complications you described are blockers for accurate dependency tracking. My initial idea was to compile files necessary for byte compilation at first and for compilation of "regular" files load components required for byte compilation and after that suppress loading of .elc files. 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.