GNU bug report logs - #46159
28.0.50; lexical-let does not work with returned closures on nativecomp

Previous Next

Package: emacs;

Reported by: "Mark A. Hershberger" <mah <at> everybody.org>

Date: Thu, 28 Jan 2021 20:12:01 UTC

Severity: normal

Found in version 28.0.50

Done: Andrea Corallo <akrl <at> sdf.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 46159 <at> debbugs.gnu.org (full text, mbox):

From: "Mark A. Hershberger" <mah <at> nichework.com>
To: Andrea Corallo <akrl <at> sdf.org>, 46159 <at> debbugs.gnu.org
Subject: Re: bug#46159: 28.0.50; lexical-let does not work with returned
 closures on nativecomp
Date: Thu, 28 Jan 2021 13:20:43 -0800 (PST)
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 <at> sdf.org wrote:

> mah--- via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" <bug-gnu-emacs <at> 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




This bug report was last modified 4 years and 114 days ago.

Previous Next


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