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 13:07:03 +0100 Message-ID: <87pnlphyxk.fsf@russet.org.uk> References: <8736ilnmp7.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="255124"; 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 14:08:12 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 1ht9sS-0014FK-5x for ged-emacs-devel@m.gmane.org; Thu, 01 Aug 2019 14:08:12 +0200 Original-Received: from localhost ([::1]:55362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ht9sQ-00017l-Oe for ged-emacs-devel@m.gmane.org; Thu, 01 Aug 2019 08:08:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41175) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ht9s7-00017e-MM for emacs-devel@gnu.org; Thu, 01 Aug 2019 08:07:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ht9s6-0003hp-Om for emacs-devel@gnu.org; Thu, 01 Aug 2019 08:07:51 -0400 Original-Received: from cloud103.planethippo.com ([78.129.138.110]:51666) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ht9s6-0003ZP-Bk for emacs-devel@gnu.org; Thu, 01 Aug 2019 08:07:50 -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=tmkAyGurdcZBURqKp1gzFimW5oHxQ5y8O0mBOBebjIc=; b=Y07nwvIjMG9/BL1s+wQfF4yJ2 BYIkOuOy/gsyP/F8Gz9j/7OeIV6o0k66RLec9TxoJII/w28Jo8AzZMUbpDEgjspUMzt7AUXOp1ppP Tu1Dp/HiplWPAcRKqYQL1F+I93vqZHBgWtviLIW+eXDx2zZh8DBNH7mhzqGIPiurrAnKmMK+B30GU AZWUMstoiTc8c/LeZjwN4HNc4c9gm/aTybhXyyrX0lMZkDWREfZ5luR8WUfFEqVdYvr+aFhf6zk+y q7dv3CKa0aolWSAlVw5IddkenShMF9N4jNMmznYwGbx6AEM3QomuYtCadCclf1/vFAiT+PFs/RTSd qkBEpYM4A==; Original-Received: from janus-nat-128-240-225-17.ncl.ac.uk ([128.240.225.17]:42849 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1ht9rP-0003Jd-RU; Thu, 01 Aug 2019 13:07:07 +0100 In-Reply-To: <8736ilnmp7.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Thu, 01 Aug 2019 13:34: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:239091 Archived-At: Lars Ingebrigtsen writes: > Making a full dependency graph is difficult, of course, due to all the > various methods files depend on each other (require, load, autoload), > but for the things we're interested in to reduce breakages > (macros/defsubst/defvar), we get 97% of the way there by just looking at > `require'. > > So would it make a sense to add something that, along the lines of the > stuff that gathers autoloads, creates a dependency.el file (by just > doing `re-search-forward "(require '"' on all the files), and that would > use this to delete .elc files before compiling the lisp directory, based > on whether something "up" in the dependency chain has changed? > > (I'd guess there are some complications here because the resulting graph > can be cyclical, but I don't think that's something that can't be worked > around...) `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. 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. Phil