GNU bug report logs - #72453
29.4; "use-package" macro does not load all expected related files

Previous Next

Package: emacs;

Reported by: Derek Upham <derek_upham <at> mailfence.com>

Date: Sat, 3 Aug 2024 21:59:01 UTC

Severity: normal

Merged with 72293

Found in version 29.4

Fixed in version 31.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Derek Upham <derek_upham <at> mailfence.com>, 72453 <at> debbugs.gnu.org
Subject: bug#72453: 29.4; "use-package" macro does not load all expected related files
Date: Sun, 18 Aug 2024 11:21:40 +0000
[Message part 1 (text/plain, inline)]
Derek Upham via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:

>   emacs --init-directory use-package-ensure-test
>
> The init file sets use-package-always-ensure to true, and we expect
> trace warnings to show up for each use-package invocation.  In fact, we
> only see them for the third and beyond.
>
>  Warning (emacs): use-package-ensure-trace files (t) nil
>  Warning (emacs): use-package-ensure-trace rx (t) nil
>  Warning (emacs): use-package-ensure-trace avoid (t) nil

Thanks for the bug report and the clear recipe to reproduce it.

I can reproduce this bug here also.

> Moving the "use-package" macro into the top-level "use-package" file
> should fix the problem.  The "use-package" file explicitly loads the
> other files, which sets up all of the defaults.

The attached less intrusive patch fixes it here.  Could you please test
that it fixes the problem for you?

The patch just moves the relevant definitions to use-package-core.el.
If Eli and Andrea see no problem with this approach, I think we could
install it on emacs-30, after the first pre-release, and otherwise on
master.

Unrelatedly, I also noticed that the defcustoms in use-package-core.el
are all missing :version tags.  I'll fix that on emacs-30 after the
first pre-release is out.
[0001-Fix-early-use-of-use-package-always-ensure.patch (text/x-patch, attachment)]

This bug report was last modified 262 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.