From: phillip.lord@russet.org.uk (Phillip Lord)
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: Dependency graph for Emacs Lisp files
Date: Thu, 01 Aug 2019 14:10:43 +0100 [thread overview]
Message-ID: <87lfwdhvzg.fsf@russet.org.uk> (raw)
In-Reply-To: <87tvb1m66r.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Thu, 01 Aug 2019 14:16:44 +0200")
Lars Ingebrigtsen <larsi@gnus.org> 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
next prev parent reply other threads:[~2019-08-01 13:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 11:34 Dependency graph for Emacs Lisp files Lars Ingebrigtsen
2019-08-01 12:07 ` Phillip Lord
2019-08-01 12:16 ` Lars Ingebrigtsen
2019-08-01 12:41 ` Noam Postavsky
2019-08-01 13:18 ` Lars Ingebrigtsen
2019-08-01 13:10 ` Phillip Lord [this message]
2019-08-01 13:16 ` Lars Ingebrigtsen
2019-08-01 13:24 ` Andreas Schwab
2019-08-01 15:29 ` Stefan Monnier
2019-08-01 15:57 ` Lars Ingebrigtsen
2019-08-01 13:00 ` Stefan Monnier
2019-08-01 13:26 ` Lars Ingebrigtsen
2019-08-01 15:27 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfwdhvzg.fsf@russet.org.uk \
--to=phillip.lord@russet.org.uk \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).