From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: Dependency graph for Emacs Lisp files Date: Thu, 01 Aug 2019 14:10:43 +0100 Message-ID: <87lfwdhvzg.fsf@russet.org.uk> References: <8736ilnmp7.fsf@mouse.gnus.org> <87pnlphyxk.fsf@russet.org.uk> <87tvb1m66r.fsf@mouse.gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="255726"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 01 15:11:10 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1htArM-0014OR-Of for ged-emacs-devel@m.gmane.org; Thu, 01 Aug 2019 15:11:08 +0200 Original-Received: from localhost ([::1]:55836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htArL-0004mj-EI for ged-emacs-devel@m.gmane.org; Thu, 01 Aug 2019 09:11:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55091) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htAr2-0004mb-0u for emacs-devel@gnu.org; Thu, 01 Aug 2019 09:10:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htAr0-0005mC-U7 for emacs-devel@gnu.org; Thu, 01 Aug 2019 09:10:47 -0400 Original-Received: from cloud103.planethippo.com ([78.129.138.110]:56484) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1htAr0-0005kn-Gd for emacs-devel@gnu.org; Thu, 01 Aug 2019 09:10:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RYvMrQjLLHDHvcQBNNE/nnQqJaZITeP/GU/eQ4ZG3mc=; b=WssruL3eF6+vhFedBHc/N3veO lJXAu3GFTZLhrM9c/mGVOqhcThWAZhwTLUtf+uzRPA2i3pZbA3ZRpXRHAlXVn/k0/rE8f7NQLkMJQ 72oKfN6yNtB1kXtCgeH1c9ASjJt5WpZ7R8s1+N5bPNHA5e40bnEzs9FQEPtUZnRyxDXCxMEUSg47w h5gmnMG4Pwn0/QQqtYUvXurElsjOqY997VAlkM7OuSZOjCmGaJDv6shhPVg15vOagitQ13F0vonLr qLRP9f6PlXrWqfMrjBy1mBdBMRda2FaED7yBVoYjWd2E5q2jnPjrXrdRvYoLPNm1EKn01aUcbXqGL pyNBj3urw==; Original-Received: from janus-nat-128-240-225-17.ncl.ac.uk ([128.240.225.17]:63766 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1htAqy-0004Xb-Kk; Thu, 01 Aug 2019 14:10:44 +0100 In-Reply-To: <87tvb1m66r.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Thu, 01 Aug 2019 14:16:44 +0200") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 78.129.138.110 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239098 Archived-At: Lars Ingebrigtsen writes: > phillip.lord@russet.org.uk (Phillip Lord) writes: > >> `make check` currently uses the a fudge based on name matching between >> tests and source files, but it missed any other form of >> dependency. Having something better would be nice. I think autoloads >> dependencies might be more thatn 3% of the problem, though, but if you >> add a mechanism based on `require` then an autoload dependency could be >> added later. > > autoloads generally don't lead to compilation breakages, do they? You > can't autoload a macro meaningfully, or a variable... Lots of dependencies happen by side-effect, though. (defun fred-function-1()) (defmacro fred-macro(&rest body)) (provide 'fred) (autoload "fred-function-1" "fred") (defun george-function-1() (fred-function-1) (fred-macro (george-function-2))) (provide 'george) Besides, if this is to work for more than compilation (i.e. testing) it's not just about compilation breakage. Functional breakage also counts. >> Rather than creating "dependency.el", though, why not create an >> includeable Makefile? That way you might need to delete anything, just >> let Make to it's dependency thing. > > I am no make expert at all, so I don't quite know what that would look > like. > > My thought was that if file A.el depended on file B.el, and B.el has > changed, then there would just be a step in the compilation process that > deleted both A.elc and B.elc, and then the rest of the process would > continue on as before. > > (We need to delete B.elc because otherwise `(require B)' in A.el would > load the old B.elc, and A.el might be byte-compiled before B.el.) a.elc: a.el b.elc b.elc: b.el Changes to b.el would now force a.elc recompilation. If this were in place then the current name based fudge for tests should work. a-test.log: a.test.el a.elc Of course, I have put this forward in simple terms -- Emacs makefile are in multiple directories, with dependencies between directories, with a complicated bootstrap, so the reality would be rather more brutal. Phil