* bug#46159: 28.0.50; lexical-let does not work with returned closures on nativecomp
@ 2021-01-28 20:10 mah--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-28 20:57 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 4+ messages in thread
From: mah--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-01-28 20:10 UTC (permalink / raw)
To: 46159
I previously filed #45056 but the problem seemed to be fixed.
It has re-appeared and I just noticed some interesting messages in my
*Warnings* buffer that appear to be relevant.
Specifically:
Warning (comp): init.el:164:39: Warning: ‘(post-cmd post-cmd)’ is a malformed function
Warning (comp): init.el:181:59: Warning: reference to free variable ‘rsync-buff’
That section of code has this function:
(defun mah/firestarter-sentinel (host post-cmd)
"Sentinal function that will run the POST-CMD on HOST."
(lexical-let ((post-cmd post-cmd)
(host host)
(rsync-buff (get-buffer-create mah/rsync-buff-name)))
(lambda (proc event-type)
(message (concat "post cmd: " post-cmd "\nevent: " event-type))
(cond ((string-equal event-type "finished\n")
(if post-cmd
(progn (message (concat "rsync finished, running "
post-cmd))
(mah/firestarter-do-post host post-cmd rsync-buff))
(message "rsync finshed")))
(t (if post-cmd
(progn (message (concat "rsync didn't finish normally, "
"running anyway. Check "
mah/rsync-buff-name))
(mah/firestarter-do-post host post-cmd rsync-buff))
(message "rsync finshed with errors")))))))
I just compiled emacs from master and it did not exhibit the same behavior
In GNU Emacs 28.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0)
of 2021-01-28 built on silk
Repository revision: 0e250276d2445b258edcb5cb12796d626e5421dc (This is b8d3ae78c5 with a patch to revert 32c6732d16385f242b1109517f25e9aefd6caa5c applied to it.)
Repository branch: feature/native-comp
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)
Configured using:
'configure --with-modules --with-xwidgets --with-gconf --with-cairo
--with-json --with-nativecomp --with-imagemagick CFLAGS=-O2'
Configured features:
ACL CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2
M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SOUND
THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Memory information:
((conses 16 1072892 320443)
(symbols 48 54985 10)
(strings 32 316990 71161)
(string-bytes 1 10029517)
(vectors 16 120122)
(vector-slots 8 3853812 409822)
(floats 8 1440 2041)
(intervals 56 1385 1047)
(buffers 984 21))
--
http://hexmode.com/
I cannot remember the books I've read any more than the meals I have eaten;
even so, they have made me.
-- Ralph Waldo Emerson
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#46159: 28.0.50; lexical-let does not work with returned closures on nativecomp
2021-01-28 20:10 bug#46159: 28.0.50; lexical-let does not work with returned closures on nativecomp mah--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-01-28 20:57 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-28 21:20 ` Mark A. Hershberger
0 siblings, 1 reply; 4+ messages in thread
From: akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-01-28 20:57 UTC (permalink / raw)
To: 46159; +Cc: mah
mah--- via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@gnu.org> writes:
> I previously filed #45056 but the problem seemed to be fixed.
>
> It has re-appeared and I just noticed some interesting messages in my
> *Warnings* buffer that appear to be relevant.
>
> Specifically:
>
> Warning (comp): init.el:164:39: Warning: ‘(post-cmd post-cmd)’ is a malformed function
> Warning (comp): init.el:181:59: Warning: reference to free variable ‘rsync-buff’
>
> That section of code has this function:
>
> (defun mah/firestarter-sentinel (host post-cmd)
> "Sentinal function that will run the POST-CMD on HOST."
> (lexical-let ((post-cmd post-cmd)
> (host host)
> (rsync-buff (get-buffer-create mah/rsync-buff-name)))
> (lambda (proc event-type)
> (message (concat "post cmd: " post-cmd "\nevent: " event-type))
> (cond ((string-equal event-type "finished\n")
> (if post-cmd
> (progn (message (concat "rsync finished, running "
> post-cmd))
> (mah/firestarter-do-post host post-cmd rsync-buff))
> (message "rsync finshed")))
> (t (if post-cmd
> (progn (message (concat "rsync didn't finish normally, "
> "running anyway. Check "
> mah/rsync-buff-name))
> (mah/firestarter-do-post host post-cmd rsync-buff))
> (message "rsync finshed with errors")))))))
>
> I just compiled emacs from master and it did not exhibit the same behavior
Hi,
do we have a reproducer? Where is possible to see the whole file being
compiled?
Could you post all the warning in the *Async-native-compile-log* emitted
compiling init.el?
Dumb question: is this file requiring all necessary libraries (ex
‘cl.el’)?
Thanks!
Andrea
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#46159: 28.0.50; lexical-let does not work with returned closures on nativecomp
2021-01-28 20:57 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-01-28 21:20 ` Mark A. Hershberger
2021-01-28 21:24 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 4+ messages in thread
From: Mark A. Hershberger @ 2021-01-28 21:20 UTC (permalink / raw)
To: Andrea Corallo, 46159
Thank you for asking the dumb question.
I thought it was there because I got warnings about cl being deprecated, but when I put (require 'cl) just before this function, suddenly it worked.
Strange that it breaks on the native-comp branch but not on master.
----- On Jan 28, 2021, at 3:57 PM, Andrea Corallo akrl@sdf.org wrote:
> mah--- via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" <bug-gnu-emacs@gnu.org> writes:
>
>> I previously filed #45056 but the problem seemed to be fixed.
>>
>> It has re-appeared and I just noticed some interesting messages in my
>> *Warnings* buffer that appear to be relevant.
>>
>> Specifically:
>>
>> Warning (comp): init.el:164:39: Warning: ‘(post-cmd post-cmd)’ is a malformed
>> function
>> Warning (comp): init.el:181:59: Warning: reference to free variable ‘rsync-buff’
>>
>> That section of code has this function:
>>
>> (defun mah/firestarter-sentinel (host post-cmd)
>> "Sentinal function that will run the POST-CMD on HOST."
>> (lexical-let ((post-cmd post-cmd)
>> (host host)
>> (rsync-buff (get-buffer-create mah/rsync-buff-name)))
>> (lambda (proc event-type)
>> (message (concat "post cmd: " post-cmd "\nevent: " event-type))
>> (cond ((string-equal event-type "finished\n")
>> (if post-cmd
>> (progn (message (concat "rsync finished, running "
>> post-cmd))
>> (mah/firestarter-do-post host post-cmd rsync-buff))
>> (message "rsync finshed")))
>> (t (if post-cmd
>> (progn (message (concat "rsync didn't finish normally, "
>> "running anyway. Check "
>> mah/rsync-buff-name))
>> (mah/firestarter-do-post host post-cmd rsync-buff))
>> (message "rsync finshed with errors")))))))
>>
>> I just compiled emacs from master and it did not exhibit the same behavior
>
> Hi,
>
> do we have a reproducer? Where is possible to see the whole file being
> compiled?
>
> Could you post all the warning in the *Async-native-compile-log* emitted
> compiling init.el?
>
> Dumb question: is this file requiring all necessary libraries (ex
> ‘cl.el’)?
>
> Thanks!
>
> Andrea
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#46159: 28.0.50; lexical-let does not work with returned closures on nativecomp
2021-01-28 21:20 ` Mark A. Hershberger
@ 2021-01-28 21:24 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 4+ messages in thread
From: akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-01-28 21:24 UTC (permalink / raw)
To: Mark A. Hershberger; +Cc: 46159-done
"Mark A. Hershberger" <mah@nichework.com> writes:
> Thank you for asking the dumb question.
:)
> I thought it was there because I got warnings about cl being deprecated, but when I put (require 'cl) just before this function, suddenly it worked.
>
> Strange that it breaks on the native-comp branch but not on master.
Byte compilation worked by chance because while compiling cl-lib was
already loaded for some reason.
Great closing.
Andrea
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-28 21:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-28 20:10 bug#46159: 28.0.50; lexical-let does not work with returned closures on nativecomp mah--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-28 20:57 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-28 21:20 ` Mark A. Hershberger
2021-01-28 21:24 ` akrl--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.