emacs-devel
[Top][All Lists]
Advanced

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

How to warn about obsolete file in ELPA package


From: Basil L. Contovounesios
Subject: How to warn about obsolete file in ELPA package
Date: Sat, 06 Feb 2021 12:19:29 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

I'm preparing to update the dash package on GNU ELPA and MELPA.
One of the planned changes for this upcoming 2.18.0 release is
the consolidation of its two constituent files dash.el and
dash-functional.el.

The latter was split off as a separate file in the past due its reliance
on lexical-binding.  Since then, dash.el has also come to depend on
Emacs 24, so we have agreed to move the definitions in
dash-functional.el to dash.el and eventually delete dash-functional.el.

The problem is that GNU ELPA has historically bundled both dash.el and
dash-functional.el under the dash package, and MELPA has bundled each as
a separate package.  In either case, a transitional dash-functional.el
file/package must be kept around for a while for backward compatibility.

We would like to emit an obsoletion warning when dash-functional.el is
used, similar to the one for lisp/obsolete/* libraries.  Hopefully such
a warning will be seen as helpful and actionable rather than annoying.

What is the best way to go about this to cover the cases where
dash-functional.el is byte-compiled, installed, or loaded?

One simple way is a top-level (lwarn 'dash :warning "Foo"), but the
message printed during byte-compilation is not recognised in
*compilation* buffers as a warning, so I fear the message may go
unnoticed.

Another option is a top-level (byte-compile-warn "Foo").  This isn't
picked up as a warning either, but at least the file name is fontified
with font-lock-function-name-face, so it sticks out a bit more.

Any suggestions along these or any better lines are most welcome.

If you're interested in the relevant discussions, see the following:
https://github.com/magnars/dash.el/wiki/Obsoletion-of-dash-functional.el
https://github.com/magnars/dash.el/issues/356

TIA,

-- 
Basil



reply via email to

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