[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dependency graph for Emacs Lisp files

From: Phillip Lord
Subject: Re: Dependency graph for Emacs Lisp files
Date: Thu, 01 Aug 2019 13:07:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux)

Lars Ingebrigtsen <address@hidden> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]