* [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload)
@ 2022-08-18 19:18 Sam James
2022-08-18 20:01 ` Michael Orlitzky
2022-08-18 22:30 ` Ulrich Mueller
0 siblings, 2 replies; 6+ messages in thread
From: Sam James @ 2022-08-18 19:18 UTC (permalink / raw
To: gentoo-dev; +Cc: Gentoo GNU Emacs project, Sam James
Emacs 29's NEWS says: "The autoload.el library is now obsolete."
We should therefore explicitly 'require it in order to have the
eclass machinery work.
Fix build failures with e.g. exec-path-from-shell, flycheck:
```
* Generating autoload file for GNU Emacs ...
Error: void-function (batch-update-autoloads)
debug-early-backtrace()
debug-early(error (void-function batch-update-autoloads))
batch-update-autoloads()
command-line-1(("--eval" "(setq make-backup-files nil)" "--eval" "(setq generated-autoload-file (expand-file-name \"exec-path-from-shell-autoloads.el\"))" "-f" "batch-update-autoloads" "."))
command-line()
normal-top-level()
Symbol’s function definition is void: batch-update-autoloads
* elisp-make-autoload-file: batch-update-autoloads failed
[ !! ]
* ERROR: app-emacs/exec-path-from-shell-1.12::gentoo failed (compile phase):
* (no error message)
```
See https://www.mail-archive.com/freebsd-pkg-fallout@freebsd.org/msg1982134.html
and https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-08/msg01259.html.
Thanks-to: John Turner <jturner.usa+gentoo@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
---
eclass/elisp-common.eclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
index 47c8132192ca..2715c26c91a8 100644
--- a/eclass/elisp-common.eclass
+++ b/eclass/elisp-common.eclass
@@ -329,6 +329,7 @@ elisp-make-autoload-file() {
EOF
${EMACS} ${EMACSFLAGS} \
+ --eval "(require 'autoload)" \
--eval "(setq make-backup-files nil)" \
--eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \
-f batch-update-autoloads "${@-.}"
--
2.37.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload)
2022-08-18 19:18 [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload) Sam James
@ 2022-08-18 20:01 ` Michael Orlitzky
2022-08-18 21:25 ` Sam James
2022-08-18 22:30 ` Ulrich Mueller
1 sibling, 1 reply; 6+ messages in thread
From: Michael Orlitzky @ 2022-08-18 20:01 UTC (permalink / raw
To: gentoo-dev
On Thu, 2022-08-18 at 20:18 +0100, Sam James wrote:
> Emacs 29's NEWS says: "The autoload.el library is now obsolete."
>
> ...
>
> ${EMACS} ${EMACSFLAGS} \
> + --eval "(require 'autoload)" \
> --eval "(setq make-backup-files nil)" \
> --eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \
> -f batch-update-autoloads "${@-.}"
The batch-update-autoloads docstring says that it "calls 'update-
directory-autoloads' on the command line arguments." The function
update-directory-autoloads is, in turn, obsoleted in favor of loaddefs-
generate from loaddefs-gen.el (which replaces autoload.el).
Can we bypass the obsolete autoload.el entirely here, instead calling
loaddefs-generate directly?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload)
2022-08-18 20:01 ` Michael Orlitzky
@ 2022-08-18 21:25 ` Sam James
2022-08-18 21:28 ` Maciej Barć
0 siblings, 1 reply; 6+ messages in thread
From: Sam James @ 2022-08-18 21:25 UTC (permalink / raw
To: gentoo-dev; +Cc: gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]
> On 18 Aug 2022, at 21:01, Michael Orlitzky <mjo@gentoo.org> wrote:
>
> On Thu, 2022-08-18 at 20:18 +0100, Sam James wrote:
>> Emacs 29's NEWS says: "The autoload.el library is now obsolete."
>>
>> ...
>>
>> ${EMACS} ${EMACSFLAGS} \
>> + --eval "(require 'autoload)" \
>> --eval "(setq make-backup-files nil)" \
>> --eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \
>> -f batch-update-autoloads "${@-.}"
>
> The batch-update-autoloads docstring says that it "calls 'update-
> directory-autoloads' on the command line arguments." The function
> update-directory-autoloads is, in turn, obsoleted in favor of loaddefs-
> generate from loaddefs-gen.el (which replaces autoload.el).
>
> Can we bypass the obsolete autoload.el entirely here, instead calling
> loaddefs-generate directly?
>
>
It looks like it might be new as of Emacs 29, so we'd need
to handle older versions somehow.
We could do it based on the Emacs version though if the eclass
has machinery for checking that (new to poking at this area).
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload)
2022-08-18 21:25 ` Sam James
@ 2022-08-18 21:28 ` Maciej Barć
2022-08-18 21:42 ` Sam James
0 siblings, 1 reply; 6+ messages in thread
From: Maciej Barć @ 2022-08-18 21:28 UTC (permalink / raw
To: gentoo-dev, Sam James; +Cc: gnu-emacs
[-- Attachment #1.1.1: Type: text/plain, Size: 1398 bytes --]
> We could do it based on the Emacs version though if the eclass
> has machinery for checking that (new to poking at this area).
There are elisp-emacs-version & elisp-check-emacs-version functions.
On 8/18/22 23:25, Sam James wrote:
>
>
>> On 18 Aug 2022, at 21:01, Michael Orlitzky <mjo@gentoo.org> wrote:
>>
>> On Thu, 2022-08-18 at 20:18 +0100, Sam James wrote:
>>> Emacs 29's NEWS says: "The autoload.el library is now obsolete."
>>>
>>> ...
>>>
>>> ${EMACS} ${EMACSFLAGS} \
>>> + --eval "(require 'autoload)" \
>>> --eval "(setq make-backup-files nil)" \
>>> --eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \
>>> -f batch-update-autoloads "${@-.}"
>>
>> The batch-update-autoloads docstring says that it "calls 'update-
>> directory-autoloads' on the command line arguments." The function
>> update-directory-autoloads is, in turn, obsoleted in favor of loaddefs-
>> generate from loaddefs-gen.el (which replaces autoload.el).
>>
>> Can we bypass the obsolete autoload.el entirely here, instead calling
>> loaddefs-generate directly?
>>
>>
>
> It looks like it might be new as of Emacs 29, so we'd need
> to handle older versions somehow.
>
> We could do it based on the Emacs version though if the eclass
> has machinery for checking that (new to poking at this area).
--
Have a great day!
~ Maciej XGQT Barć
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 6297 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload)
2022-08-18 21:28 ` Maciej Barć
@ 2022-08-18 21:42 ` Sam James
0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2022-08-18 21:42 UTC (permalink / raw
To: Maciej Barć; +Cc: gentoo-dev, gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
> On 18 Aug 2022, at 22:28, Maciej Barć <xgqt@gentoo.org> wrote:
>
>> We could do it based on the Emacs version though if the eclass
>> has machinery for checking that (new to poking at this area).
>
>
> There are elisp-emacs-version & elisp-check-emacs-version functions.
>
>
Thanks! I think I'm too new to elisp to confidently give a patch
to convert to loaddefs-generate though.
Best,
sam
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload)
2022-08-18 19:18 [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload) Sam James
2022-08-18 20:01 ` Michael Orlitzky
@ 2022-08-18 22:30 ` Ulrich Mueller
1 sibling, 0 replies; 6+ messages in thread
From: Ulrich Mueller @ 2022-08-18 22:30 UTC (permalink / raw
To: Sam James; +Cc: gentoo-dev, Gentoo GNU Emacs project
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
>>>>> On Thu, 18 Aug 2022, Sam James wrote:
> ${EMACS} ${EMACSFLAGS} \
> + --eval "(require 'autoload)" \
> --eval "(setq make-backup-files nil)" \
> --eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" \
> -f batch-update-autoloads "${@-.}"
Thanks, merged.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-08-18 22:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-18 19:18 [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload) Sam James
2022-08-18 20:01 ` Michael Orlitzky
2022-08-18 21:25 ` Sam James
2022-08-18 21:28 ` Maciej Barć
2022-08-18 21:42 ` Sam James
2022-08-18 22:30 ` Ulrich Mueller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox