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: Thu, 11 May 2023 22:14:03 +0700 Message-ID: References: <17b74a48-94e1-9106-cc79-d31972313910@gutov.dev> <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> <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> 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="33489"; 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: bzg@gnu.org, dmitry@gutov.dev, yantar92@posteo.net, 62762@debbugs.gnu.org, acm@muc.de To: Stefan Monnier , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 11 17:15:25 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 1px80q-0008VJ-6F for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 May 2023 17:15:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1px80W-0000QC-Qe; Thu, 11 May 2023 11:15: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 1px80U-0000Pj-Rc for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 11:15: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 1px80U-0003cp-II for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 11:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1px80U-0003qa-3K for bug-gnu-emacs@gnu.org; Thu, 11 May 2023 11:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Max Nikulin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 May 2023 15:15: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.168381805414709 (code B ref 62762); Thu, 11 May 2023 15:15:02 +0000 Original-Received: (at 62762) by debbugs.gnu.org; 11 May 2023 15:14:14 +0000 Original-Received: from localhost ([127.0.0.1]:53147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px7zi-0003pA-0M for submit@debbugs.gnu.org; Thu, 11 May 2023 11:14:14 -0400 Original-Received: from mail-lf1-f54.google.com ([209.85.167.54]:62865) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px7zg-0003ot-Ja for 62762@debbugs.gnu.org; Thu, 11 May 2023 11:14:13 -0400 Original-Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-4f00d41df22so47823404e87.1 for <62762@debbugs.gnu.org>; Thu, 11 May 2023 08:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683818046; x=1686410046; 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=NbSp3umIc0ASAG2/CpQY5gM0Ya/ov5d7mKqaCf0Difo=; b=j0MeVWhyOqxzOjuJEENTQubJRtcX+gFLaRxVrqzZe3mNgbZSyC4eX7Qm97dG8qIniN 2amEhVadLetUKJIg9VWDpKRLQgEesteoGcMupmFT03tjjxcXDi0H6h1g/YS3KE4rWn/P 8OB0epQXiqYGmSvF8MaMmzUJqzpik9iHTaXHIkYCysGQom/jKnaFwXi4AupICMGqfv0D HJ8mT9FPTWwozfUkLPckFiW08HU7ZL5vFK+R0sp4bLGFKFSnQlGyseOsnwUeC7emoAO+ MLFmJIzHGl175vaVGhdM7/tf2l7RmIwT9HhbX6M5kldNuWf8LJCHyZZTYkX47QkAdT6g NxUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683818046; x=1686410046; 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=NbSp3umIc0ASAG2/CpQY5gM0Ya/ov5d7mKqaCf0Difo=; b=R4f4RNlWgyHDC9gKeM+Lt7dWW1KQZwx+NdgylIsqxm/a6q4nyoQTTCsZ15ENdjOuFy 55Wf4fAynU+4ORVfh1/bX8OTbadZPUv12hhsoK92wkRxU44tCJ285TMBVZ44Uc1086hK Qa+f56OXVh3CK9687fsmFn8xrfHCX0DLCb5+87qetVXqlOyQMm1vmxYxOJ9QI86iLW7T P4rohbqgQ86WA7vD5obm1jl9aRzXMJt8h0pXP26ZyGfuHiD3TQlkc9rru1N5xB77tmyY 35EV7XDMBmWh+bmhn5BJGjjWnVSywf5II6Pq2b3ZTz3vWzVwyq+BoMTY6/rafme5SQsS r7SQ== X-Gm-Message-State: AC+VfDzIvbJPevVHNIYXxer8U/Ri0yfGmB9ZXA70Kw8rRzXOMGEUy4ID RijMJahplqtNuK4GaZ5MDEo= X-Google-Smtp-Source: ACHHUZ7hkYN6tLrIreG9YX0zjdD9/xUp2pfipdqpD1984ZRE0Ai8EH+4Xr9p4OW8xc/2Wz8j6MonzA== X-Received: by 2002:ac2:414e:0:b0:4ed:bb8c:5058 with SMTP id c14-20020ac2414e000000b004edbb8c5058mr2206966lfi.6.1683818046185; Thu, 11 May 2023 08:14:06 -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 n7-20020ac242c7000000b004f1d884a4efsm1133044lfl.242.2023.05.11.08.14.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 May 2023 08:14:05 -0700 (PDT) Content-Language: en-US In-Reply-To: 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:261576 Archived-At: On 06/05/2023 01:26, Stefan Monnier wrote: >> If you want to find them, you will have to write the code to detect >> those dependencies, and then look at the graph produced from them. >> There's no other way (unless Stefan happens to remember some by >> heart, by some luck). > I think looking for calls to `provide` that are not at the end of files > is a good first step to finding the obvious ones (if my memory serves, > viper and ediff are two examples in Emacs's own code. I see no cyclic dependency in viper, at least based on `require': viper.elc: viper-init.elc viper-keym.elc viper-cmd.elc viper-cmd.elc: viper-util.elc viper-keym.elc viper-mous.elc viper-macs.elc viper-ex.elc viper-macs.elc: viper-mous.elc viper-ex.elc viper-util.elc viper-keym.elc viper-ex.elc: viper-keym.elc viper-util.elc viper-keym.elc: viper-util.elc viper-mous.elc: viper-util.elc viper-util.elc: viper-init.elc I expect that it should ensure ordering for make allowing parallel execution to some degree. Frankly speaking, I have not realized why `provide' not at the end is important. Do you mean the following lisp/vc/ediff-util.el:(provide 'ediff-util) ;FIXME: Break cyclic dependencies and move to the end! and mutual `require' 'ediff-util from ediff-init.el and 'ediff-init from ediff-util.el? My idea was to suppress loading of .elc files during compilation of such files.