jwiegley / emacs-async

Simple library for asynchronous processing in Emacs
GNU General Public License v3.0
829 stars 68 forks source link

Compilation error on Emacs 26.3 (`when-let` not recognized) #172

Closed alphapapa closed 1 year ago

alphapapa commented 1 year ago

Regarding https://github.com/jwiegley/emacs-async/issues/169 and the issue fixed in https://github.com/jwiegley/emacs-async/pull/170:

FWIW, I also noticed that, soon after I finally got org-ql's test suite passing again, it started failing again, but only on Emacs versions 26.3 and snapshot. For example, see the "Initialize sandbox" phase here: https://github.com/alphapapa/org-ql/actions/runs/4373888244/jobs/7735467506 And even commits on which the test suite passed before now don't. Finally I tracked it down to this problem. :)

@thierryvolpiatto However, in the run on Emacs 26.3, I still see in the log output parts like this:

Compiling /tmp/tmp.Zvc7Ucd6bU/26.3/elpa/async-20230313.1503/async.el...

In toplevel form:
async.el:210:1:Warning: Unused lexical variable ‘msg’

In async-read-from-client:
async.el:210:37:Warning: ‘(msg-decoded (ignore-errors (base64-decode-string
    msg)))’ is a malformed function
async.el:242:62:Warning: reference to free variable ‘msg-decoded’
async.el:243:39:Warning: assignment to free variable ‘msg-decoded’

In end of data:
async.el:570:1:Warning: the function ‘when-let’ is not known to be defined.

So it would seem that, on Emacs <= 26.3, the when-let macro needs to be handled correctly (IIRC it's necessary to (require 'subr-x), or something like that).

Thanks for your work.

basil-conto commented 1 year ago

So it would seem that, on Emacs <= 26.3, the when-let macro needs to be handled correctly (IIRC it's necessary to (require 'subr-x), or something like that).

It should probably be avoided altogether so long as async.el assumes Emacs 24.4.

thierryvolpiatto commented 1 year ago

"Basil L. Contovounesios" @.***> writes:

So it would seem that, on Emacs <= 26.3, the when-let macro needs to be handled correctly (IIRC it's necessary to (require 'subr-x), or something like that).

It should probably be avoided altogether so long as async.el assumes Emacs 24.4.

Fixed by 328bca5.

Thanks.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.*Message ID: @.***>

-- Thierry

alphapapa commented 1 year ago

@basil-conto @thierryvolpiatto Thanks!