Unverified Commit 2f7cc5a7 authored by Lin Jian's avatar Lin Jian
Browse files

emacsPackages: respect turnCompilationWarningToError and ignoreCompilationError at bytecompile time

Previously, these two attributes were only respected at nativecompile
time.
parent bc2ab9c4
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -31,3 +31,12 @@ The file can either be a tar file or an Emacs Lisp file."

;; Allow installing package tarfiles larger than 10MB
(setq large-file-warning-threshold nil)

(let ((flag (getenv "turnCompilationWarningToError")))
  (when (and flag
             (not (string-empty-p flag)))
    (setq byte-compile-error-on-warn t)))

(let ((flag (getenv "ignoreCompilationError")))
  (when (string-empty-p flag)
    (setq byte-compile-debug t)))
+2 −2
Original line number Diff line number Diff line
@@ -64,6 +64,8 @@ libBuildHelper.extendMkDerivation' stdenv.mkDerivation (finalAttrs:

  setupHook = args.setupHook or setupHook;

  inherit turnCompilationWarningToError ignoreCompilationError;

  meta = {
    broken = false;
    platforms = emacs.meta.platforms;
@@ -76,8 +78,6 @@ libBuildHelper.extendMkDerivation' stdenv.mkDerivation (finalAttrs:

  addEmacsNativeLoadPath = args.addEmacsNativeLoadPath or true;

  inherit turnCompilationWarningToError ignoreCompilationError;

  postInstall = ''
    # Besides adding the output directory to the native load path, make sure
    # the current package's elisp files are in the load path, otherwise