GNU bug report logs -
#77918
31.0.50; Warnings about missing 'lexical-binding' cookie in *Async-native-compile-log*
Previous Next
To reply to this bug, email your comments to 77918 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77918
; Package
emacs
.
(Sat, 19 Apr 2025 08:42:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Roi Martin <jroi.martin <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 19 Apr 2025 08:42:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Several warnings about missing 'lexical-binding' cookie show up in
*Async-native-compile-log*. They seem to show up when a feature that
has not been compiled yet is used and needs to be compiled. The issue
is reproducible by just running 'emacs -Q'. You can find some of the
warnings below.
Warning (files): Missing ‘lexical-binding’ cookie in "/tmp/emacs-async-comp-dired-aux-xXuqdt.el".
You can add one with ‘M-x elisp-enable-lexical-binding RET’.
See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’
for more information.
Compiling /home/n/src/emacs/lisp/dired-aux.el...
Compilation finished.
Warning (files): Missing ‘lexical-binding’ cookie in "/tmp/emacs-async-comp-shell-rZsYYK.el".
You can add one with ‘M-x elisp-enable-lexical-binding RET’.
See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’
for more information.
Compiling /home/n/src/emacs/lisp/shell.el...
Warning (files): Missing ‘lexical-binding’ cookie in "/tmp/emacs-async-comp-pcomplete-lO4nJm.el".
You can add one with ‘M-x elisp-enable-lexical-binding RET’.
See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’
for more information.
Compiling /home/n/src/emacs/lisp/pcomplete.el...
Warning (files): Missing ‘lexical-binding’ cookie in "/tmp/emacs-async-comp-files-x-oLXnPa.el".
You can add one with ‘M-x elisp-enable-lexical-binding RET’.
See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’
for more information.
Compiling /home/n/src/emacs/lisp/files-x.el...
Compilation finished.
Warning (files): Missing ‘lexical-binding’ cookie in "/tmp/emacs-async-comp-rfc2047-XugClb.el".
You can add one with ‘M-x elisp-enable-lexical-binding RET’.
See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’
for more information.
Compiling /home/n/src/emacs/lisp/mail/rfc2047.el...
Compilation finished.
What follows is one of the .el files that produced the warning
(emacs-async-comp-icomplete-tWY9i1.el). Note that I elided the
native-comp-eln-load-path and load-path values to shorten the report.
(require 'comp)(setq comp-async-compilation t warning-fill-column most-positive-fixnum)(setq comp-file-preloaded-p 'nil native-comp-verbose '0 native-comp-eln-load-path '(...) load-path '(...) byte-compile-warnings 't)nil(message "Compiling %s..." "/home/n/src/emacs/lisp/icomplete.el")(comp--native-compile "/home/n/src/emacs/lisp/icomplete.el" t)
In GNU Emacs 31.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version
3.24.43, cairo version 1.18.2) of 2025-04-19 built on wopr
Repository revision: 9ea9c5a73e004903ca1c6e15cf5797458315ad9a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12401006
System Description: Fedora Linux 41 (Workstation Edition)
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB
Important settings:
value of $LC_MONETARY: en_IE.UTF-8
value of $LC_NUMERIC: en_IE.UTF-8
value of $LC_TIME: en_IE.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: elisp-compile
Minor modes in effect:
icomplete-mode: t
fido-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
buffer-read-only: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(help-mode pp shadow sort mail-extr emacsbug lisp-mnt message mailcap
yank-media puny rfc822 mml mml-sec password-cache epa derived epg
rfc6068 epg-config gnus-util time-date mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils display-line-numbers
files-x shell pcomplete compile text-property-search comint subr-x
ansi-osc ansi-color ring dired-aux dired dired-loaddefs comp-run
bytecomp byte-compile comp-common rx icomplete cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process tty-child-frames native-compile emacs)
Memory information:
((conses 16 171289 28956) (symbols 48 7497 4) (strings 32 26333 2931)
(string-bytes 1 757901) (vectors 16 14367)
(vector-slots 8 182883 43794) (floats 8 35 1262)
(intervals 56 5930 1736) (buffers 992 16))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77918
; Package
emacs
.
(Sat, 19 Apr 2025 11:47:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 77918 <at> debbugs.gnu.org (full text, mbox):
> From: Roi Martin <jroi.martin <at> gmail.com>
> Date: Sat, 19 Apr 2025 10:41:35 +0200
>
>
> Several warnings about missing 'lexical-binding' cookie show up in
> *Async-native-compile-log*. They seem to show up when a feature that
> has not been compiled yet is used and needs to be compiled. The issue
> is reproducible by just running 'emacs -Q'. You can find some of the
> warnings below.
>
> Warning (files): Missing ‘lexical-binding’ cookie in "/tmp/emacs-async-comp-dired-aux-xXuqdt.el".
> You can add one with ‘M-x elisp-enable-lexical-binding RET’.
> See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’
> for more information.
> Compiling /home/n/src/emacs/lisp/dired-aux.el...
> Compilation finished.
> Warning (files): Missing ‘lexical-binding’ cookie in "/tmp/emacs-async-comp-shell-rZsYYK.el".
> You can add one with ‘M-x elisp-enable-lexical-binding RET’.
> See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’
> for more information.
> Compiling /home/n/src/emacs/lisp/shell.el...
> Warning (files): Missing ‘lexical-binding’ cookie in "/tmp/emacs-async-comp-pcomplete-lO4nJm.el".
> You can add one with ‘M-x elisp-enable-lexical-binding RET’.
> See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’
> for more information.
> Compiling /home/n/src/emacs/lisp/pcomplete.el...
> Warning (files): Missing ‘lexical-binding’ cookie in "/tmp/emacs-async-comp-files-x-oLXnPa.el".
> You can add one with ‘M-x elisp-enable-lexical-binding RET’.
> See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’
> for more information.
> Compiling /home/n/src/emacs/lisp/files-x.el...
> Compilation finished.
> Warning (files): Missing ‘lexical-binding’ cookie in "/tmp/emacs-async-comp-rfc2047-XugClb.el".
> You can add one with ‘M-x elisp-enable-lexical-binding RET’.
> See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’
> for more information.
> Compiling /home/n/src/emacs/lisp/mail/rfc2047.el...
> Compilation finished.
>
> What follows is one of the .el files that produced the warning
> (emacs-async-comp-icomplete-tWY9i1.el). Note that I elided the
> native-comp-eln-load-path and load-path values to shorten the report.
>
> (require 'comp)(setq comp-async-compilation t warning-fill-column most-positive-fixnum)(setq comp-file-preloaded-p 'nil native-comp-verbose '0 native-comp-eln-load-path '(...) load-path '(...) byte-compile-warnings 't)nil(message "Compiling %s..." "/home/n/src/emacs/lisp/icomplete.el")(comp--native-compile "/home/n/src/emacs/lisp/icomplete.el" t)
Andrea, what would you suggest as the solution for these warnings?
(This was already reported as part of the discussion on emacs-devel,
but we never finalized the solution for this aspect.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77918
; Package
emacs
.
(Sat, 19 Apr 2025 11:55:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 77918 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
> Andrea, what would you suggest as the solution for these warnings?
>
> (This was already reported as part of the discussion on emacs-devel,
> but we never finalized the solution for this aspect.)
I attached a possible fix. Does it make sense?
[0001-Fix-missing-lexical-binding-cookie-warning-on-async-.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77918
; Package
emacs
.
(Sat, 19 Apr 2025 12:22:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 77918 <at> debbugs.gnu.org (full text, mbox):
> From: Roi Martin <jroi.martin <at> gmail.com>
> Cc: 77918 <at> debbugs.gnu.org
> Date: Sat, 19 Apr 2025 13:54:47 +0200
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > Andrea, what would you suggest as the solution for these warnings?
> >
> > (This was already reported as part of the discussion on emacs-devel,
> > but we never finalized the solution for this aspect.)
>
> I attached a possible fix. Does it make sense?
Thanks, but let's wait for Andrea to chime in. He knows the
subtleties of this code better than anyone, and I wouldn't assume
lexical-binding always does TRT there without his say-so.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77918
; Package
emacs
.
(Thu, 24 Apr 2025 14:05:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 77918 <at> debbugs.gnu.org (full text, mbox):
Roi Martin <jroi.martin <at> gmail.com> writes:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>> Andrea, what would you suggest as the solution for these warnings?
>>
>> (This was already reported as part of the discussion on emacs-devel,
>> but we never finalized the solution for this aspect.)
>
> I attached a possible fix. Does it make sense?
Thanks it does to me. Is it tested?
Andrea
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77918
; Package
emacs
.
(Thu, 24 Apr 2025 14:24:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 77918 <at> debbugs.gnu.org (full text, mbox):
Andrea Corallo <acorallo <at> gnu.org> writes:
> Thanks it does to me. Is it tested?
It seems to work fine on my machine. This is the contents of
*Async-native-compile-log* after applying the patch:
Compiling /home/n/src/emacs/lisp/icomplete.el...
Compiling /home/n/src/emacs/lisp/emacs-lisp/subr-x.el...
Compiling /home/n/src/emacs/lisp/progmodes/compile.el...
Compiling /home/n/src/emacs/lisp/emacs-lisp/text-property-search.el...
Compiling /home/n/src/emacs/lisp/comint.el...
Compiling /home/n/src/emacs/lisp/ansi-osc.el...
Compiling /home/n/src/emacs/lisp/ansi-color.el...
Compiling /home/n/src/emacs/lisp/emacs-lisp/ring.el...
Compiling /home/n/src/emacs/lisp/emacs-lisp/rx.el...
Compiling /home/n/src/emacs/lisp/emacs-lisp/cl-lib.el...
Compilation finished.
Compiling /home/n/src/emacs/lisp/display-line-numbers.el...
Compilation finished.
This is how one random temporary file looks like (I elided
native-comp-eln-load-path and load-path to shorten the output):
==> emacs-async-comp-time-date-5tSTnM.el <==
;;; -*- lexical-binding: t -*-
(require 'comp)(setq comp-async-compilation t warning-fill-column most-positive-fixnum)(setq comp-file-preloaded-p 'nil native-comp-verbose '0 native-comp-eln-load-path '(...) load-path '(...) byte-compile-warnings 't)nil(message "Compiling %s..." "/home/n/src/emacs/lisp/calendar/time-date.el")(comp--native-compile "/home/n/src/emacs/lisp/calendar/time-date.el" t)
Also, eln files are created under 'eln-cache' in the init directory.
However, I did not run any additional test. Is there any specific thing
you want me to check?
Reply sent
to
Andrea Corallo <acorallo <at> gnu.org>
:
You have taken responsibility.
(Fri, 25 Apr 2025 20:38:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Roi Martin <jroi.martin <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 25 Apr 2025 20:38:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 77918-done <at> debbugs.gnu.org (full text, mbox):
Roi Martin <jroi.martin <at> gmail.com> writes:
> Andrea Corallo <acorallo <at> gnu.org> writes:
>
>> Thanks it does to me. Is it tested?
>
> It seems to work fine on my machine. This is the contents of
> *Async-native-compile-log* after applying the patch:
>
> Compiling /home/n/src/emacs/lisp/icomplete.el...
> Compiling /home/n/src/emacs/lisp/emacs-lisp/subr-x.el...
> Compiling /home/n/src/emacs/lisp/progmodes/compile.el...
> Compiling /home/n/src/emacs/lisp/emacs-lisp/text-property-search.el...
> Compiling /home/n/src/emacs/lisp/comint.el...
> Compiling /home/n/src/emacs/lisp/ansi-osc.el...
> Compiling /home/n/src/emacs/lisp/ansi-color.el...
> Compiling /home/n/src/emacs/lisp/emacs-lisp/ring.el...
> Compiling /home/n/src/emacs/lisp/emacs-lisp/rx.el...
> Compiling /home/n/src/emacs/lisp/emacs-lisp/cl-lib.el...
> Compilation finished.
> Compiling /home/n/src/emacs/lisp/display-line-numbers.el...
> Compilation finished.
>
> This is how one random temporary file looks like (I elided
> native-comp-eln-load-path and load-path to shorten the output):
>
> ==> emacs-async-comp-time-date-5tSTnM.el <==
> ;;; -*- lexical-binding: t -*-
> (require 'comp)(setq comp-async-compilation t warning-fill-column
> most-positive-fixnum)(setq comp-file-preloaded-p 'nil
> native-comp-verbose '0 native-comp-eln-load-path '(...) load-path
> '(...) byte-compile-warnings 't)nil(message "Compiling %s..."
> "/home/n/src/emacs/lisp/calendar/time-date.el")(comp--native-compile
> "/home/n/src/emacs/lisp/calendar/time-date.el" t)
>
> Also, eln files are created under 'eln-cache' in the init directory.
>
> However, I did not run any additional test. Is there any specific thing
> you want me to check?
Thanks I think is okay. I've installed your patch with 3098d34bfd1.
I'm also closing the bug.
Thanks!
Andrea
This bug report was last modified 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.