[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 14:10:43 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) |
Lars Ingebrigtsen <address@hidden> writes:
> address@hidden (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
- Dependency graph for Emacs Lisp files, Lars Ingebrigtsen, 2019/08/01
- Re: Dependency graph for Emacs Lisp files, Phillip Lord, 2019/08/01
- Re: Dependency graph for Emacs Lisp files, Lars Ingebrigtsen, 2019/08/01
- Re: Dependency graph for Emacs Lisp files,
Phillip Lord <=
- Re: Dependency graph for Emacs Lisp files, Lars Ingebrigtsen, 2019/08/01
- Re: Dependency graph for Emacs Lisp files, Andreas Schwab, 2019/08/01
- Re: Dependency graph for Emacs Lisp files, Stefan Monnier, 2019/08/01
- Re: Dependency graph for Emacs Lisp files, Lars Ingebrigtsen, 2019/08/01
Re: Dependency graph for Emacs Lisp files, Stefan Monnier, 2019/08/01