Build fails with recent master branch of Emacs
yasuhirokimura opened this issue · 1 comments
With recent master branch of Emacs build fails as following.
(MINGW64)yasu@rolling[1167]% LANG=C make
emacs -Q -batch -L . -eval '(setq byte-compile-error-on-warn t)' -f batch-byte-compile dash.el
In toplevel form:
dash.el:316:1: Error: Variable `it' left uninitialized
make: *** [Makefile:69: dash.elc] Error 1
(MINGW64)yasu@rolling[1168]%
I tried bisect with Emacs Git repository and found the error happens with following commit and
later.
commit e13c30132a81ca2087f7d1a3adc5f6feab84ea2e
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date: Thu Mar 11 13:01:59 2021 -0500
* lisp/emacs-lisp/cconv.el (cconv--analyze-use): Warn never-initialized vars
(byte-compile-not-lexical-var-p): Remove Emacs<24 compatibility.
According to the commit message, this is obviously intentional incompatible change about warning.
And probably it results in the error. So it need to be fixed by dash.el side.
Thanks for catching and bisecting this!
I have now pacified these warnings in commit b9286a8.
See also the upstream discussion about false positives in https://bugs.gnu.org/47080
And probably it results in the error.
To be fair, the upstream change only emits a warning, which in our case is a false positive due to both the limitations of Elisp's unhygienic macro system, and the API that Dash exposes.
In Dash's Makefile
, warnings are promoted to errors by default, to help catch issues across multiple Emacs versions as early as possible. This is controlled by (setq byte-compile-error-on-warn t)
, and can be disabled with e.g. make WERROR=nil
.