unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* More reliable byte compilation, take 45
@ 2021-10-04 10:51 Lars Ingebrigtsen
  2021-10-04 15:36 ` Clément Pit-Claudel
  2021-10-04 16:03 ` Steingold
  0 siblings, 2 replies; 19+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-04 10:51 UTC (permalink / raw)
  To: emacs-devel

Various schemes to make byte compilation more reliable has been mooted,
but none have been practical.

To recap: The problem is that if we change a macro in foo.el, and bar.el
uses that macro, bar.el won't be recompiled after changing the macro in
foo.el.

A defensive solution would be to recompile all libraries that require a
library, building a dependency tree from require/autoloads/etc, but the
problem is then that if you edit anything in subr.el, then you have to
recompile all the .el files, basically.  So it's not practical.

So we want a solution that's 1) fairly fast and 2) somewhat reliable.  A
100% solution isn't necessary -- just something that's less "well, just
say 'make bootstrap' then".

So here's the idea of the day:

make macro-recompile

would go through all the .el files and just look for "^\(defmacro ([^
\t\n]+)" (and defsubst and cl-defstruct and probably a couple of other
things, but not a whole lot more), and then do a sha256 of the region
from the start of the match and until the next "^(".  It would maintain
a database of these macro names/hashes.  If a macro changes its hash, it
would then just grep through all the .el files for the macro name, and
delete the .elc files where it fines matches.

The point here is to make it feasible to alter macros and see whether
there's any horrible fall-out immediately, with some confidence.  So it
has to be fast, and not result in too much recompilation.

So writing a little C helper program to do the hashing stuff might
possibly be the way to go here.

Does this sound feasible and useful?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-10-05 19:30 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-04 10:51 More reliable byte compilation, take 45 Lars Ingebrigtsen
2021-10-04 15:36 ` Clément Pit-Claudel
2021-10-04 16:16   ` Lars Ingebrigtsen
2021-10-04 18:16   ` T.V Raman
2021-10-04 18:21     ` Eli Zaretskii
2021-10-04 19:18       ` Stefan Monnier
2021-10-04 19:51         ` Eli Zaretskii
2021-10-04 20:13           ` Stefan Monnier
2021-10-05 11:52             ` Eli Zaretskii
2021-10-05 13:27               ` Stefan Monnier
2021-10-05 14:06                 ` Adam Porter
2021-10-05 15:41                 ` Eli Zaretskii
2021-10-04 16:03 ` Steingold
2021-10-04 17:35   ` Lars Ingebrigtsen
2021-10-04 18:59     ` Steingold
2021-10-05  7:14       ` Lars Ingebrigtsen
2021-10-05 14:50         ` Steingold
2021-10-05 14:51   ` Steingold
2021-10-05 19:30     ` Stefan Monnier

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).