This is about building Magit from a fresh checkout in a CI environment where Git isn't available. To reproduce on GNU/Linux, you can e.g. make Git temporarily unavailable by bind-mounting it to a non-executable file:
make clean
bwrap --dev-bind / / --ro-bind /etc/hostname /usr/bin/git make lisp LOAD_PATH="-L . -L ../dash/ -L ../with-editor/lisp/"
Compiling the first few files will work, but then compiling magit-status will fail:
Compiling magit-status.el
In toplevel form:
magit-status.el:32:1: Error: Searching for program: Permission denied, git
make[1]: *** [Makefile:77: magit-status.elc] Error 1
I think the logic in
|
;; Git isn't required while building Magit. |
|
(cl-eval-when (load eval) |
|
(magit-git-version-assert)) |
doesn't catch this case.
(cl-eval-when (load eval) ...) will work as intended when magit.el is byte-compiled, but not when it's loaded as a dependency of some other file to be byte-compiled. This should probably be changed to something that tests whether byte-compilation is active at all, e.g. whether
byte-compile-current-file is non-nil.
This is about building Magit from a fresh checkout in a CI environment where Git isn't available. To reproduce on GNU/Linux, you can e.g. make Git temporarily unavailable by bind-mounting it to a non-executable file:
make clean bwrap --dev-bind / / --ro-bind /etc/hostname /usr/bin/git make lisp LOAD_PATH="-L . -L ../dash/ -L ../with-editor/lisp/"Compiling the first few files will work, but then compiling magit-status will fail:
I think the logic in
magit/lisp/magit.el
Lines 618 to 620 in 9fa3e49
(cl-eval-when (load eval) ...)will work as intended when magit.el is byte-compiled, but not when it's loaded as a dependency of some other file to be byte-compiled. This should probably be changed to something that tests whether byte-compilation is active at all, e.g. whetherbyte-compile-current-fileis non-nil.