emacs-devel
[Top][All Lists]
Advanced

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

Obtaining a database of new functionality per Emacs version


From: Vasilij Schneidermann
Subject: Obtaining a database of new functionality per Emacs version
Date: Mon, 7 Dec 2020 13:23:29 +0100

Hello everyone,

I'm looking into creating a tool helping me with ensuring that my
packages actually support the Emacs versions they claim to by
highlighting uses of unsupported functions/variables [1]. For example if
I were to commit myself on supporting Debian stable with its Emacs 26.1,
that tool would highlight uses of `with-suppressed-warnings`, a macro
introduced in Emacs 27.1. The first problem to tackle is that there
doesn't seem to be a ready-made database. I've identified the following
options for making my own:

- Relying on metadata from custom.el: Works on customizables only.
- Combing through NEWS files: Not machine-readable, tedious, prone to
  mistakes (not all new functionality is marked as such, for example
  there's renames like `with-connection-local-profiles` to
  `with-connection-local-variables`).
- Combing through CHANGELOG: Not machine-readable either, tedious, not
  cleanly separated by versions, seemingly the wrong data source to
  consult.
- Launching an Emacs process, loading up all functionality, dumping all
  symbols, diffing against the output of an Emacs process of an older
  version, filtering out symbols introduced by our own code: This might
  just work (loading up functionality has side effects), but surely
  there's a better way, right?

Anything obvious I'm overlooking? Should there perhaps be an effort
towards documenting versioned public API?

Vasilij

[1]: I realize that this is far from solving the whole problem as
incorrect uses might still slip through, for example APIs taking a
different amount of arguments. To detect these, CI is required. However
I believe there is still merit to a tool run before CI kicks in...

Attachment: signature.asc
Description: PGP signature


reply via email to

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