unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org, Vasilij Schneidermann <mail@vasilij.de>
Subject: Re: Obtaining a database of new functionality per Emacs version
Date: Mon, 07 Dec 2020 15:08:42 -0500	[thread overview]
Message-ID: <jwv360h8k8g.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83a6up8oqg.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 07 Dec 2020 20:17:43 +0200")

>> > Manually or automatically?  If manually, the result will be as
>> > accurate and comprehensive as NEWS.  If automatically, please tell
>> > what kind of implementation you have in mind.
>> Manually, similar to how version information is added to customizables.
> That needs Someone™ to be extra vigilant and double-check any changes
> that add functions to prod people to mark them with a version tag.  My
> experience with being that cop in defcustoms case is that the
> probability of some falling through the cracks is non-negligible.

I also doubt we'll find someone willing to take on that job.
It's a big job and we've lived with it for so many years that it's hard
to convince oneself that it's worth the trouble.

I do think it'd be useful, but I think it can be made largely automatic,
which so it requires much less work and suffers from fewer errors.

>> The gain is having a machine-readable version you can consult from a
>> Lisp program. Who knows, maybe you could use it to make an Emacs Lisp
>> spec independent implementations could target...
> I know of libraries that have this as part of their SOPs, but Emacs is
> so much larger than any library that I doubt if this scales well
> enough.  So I don't believe such manual procedures will be reliable
> enough in Emacs.  One possible idea is to have a Git commit hook that
> would reject commits with new functions if they fail to include the
> necessary tag.

Also, if we want to have this as a "dependency checker", then it'll have
to deal not just with "core ELisp" but also with all the bundled
packages, which is quite different from the usual notion of "API version".

Maybe a script that scrapes the `DEFUN`s and `DEFVAR`s from the C code,
along with the `defun`s and `defvar`s from the Lisp code would be a good
start.  Of course, loading all the Elisp files and then dumping the
`obarray` would also be another valid alternative (but this one
requires building old versions of Emacs).

We could apply that to the source for various past Emacs versions to
build a prefix-tree indicating in which version each was introduced.
We could then compress this tree by "cutting the branches" as soon as
all the leaves below map to the same version.


        Stefan




  reply	other threads:[~2020-12-07 20:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07 12:23 Obtaining a database of new functionality per Emacs version Vasilij Schneidermann
2020-12-07 15:19 ` Stefan Monnier
2020-12-07 18:11   ` Vasilij Schneidermann
2020-12-07 18:20     ` Eli Zaretskii
2020-12-07 19:54     ` Stefan Monnier
2020-12-07 15:34 ` Eli Zaretskii
2020-12-07 17:50   ` Vasilij Schneidermann
2020-12-07 18:17     ` Eli Zaretskii
2020-12-07 20:08       ` Stefan Monnier [this message]
2020-12-07 20:25         ` Eli Zaretskii
2020-12-07 20:40           ` Stefan Monnier
2020-12-10  7:31 ` Jean Louis
2020-12-10 14:14   ` Eli Zaretskii
2020-12-10 16:47     ` Stefan Monnier
2020-12-10 17:22       ` Vasilij Schneidermann
2020-12-10 17:59         ` 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=jwv360h8k8g.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mail@vasilij.de \
    /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).