File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed
Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -606,10 +606,14 @@ possible to build arbitrary targets this way."
606606 (with-temp-buffer
607607 (insert-file-contents source )
608608 ; ; Older versions don't understand `no-mode' .
609- (hack-local-variables (when (>= emacs-major-version 26 ) 'no-mode ))))))
609+ (hack-local-variables (when (>= emacs-major-version 26 ) 'no-mode ))
610+ no-byte-compile))))
610611 ; ; Don't do anything with `no-byte-compile' files (not even load) unless called
611612 ; ; recursively. Otherwise we might e.g. attempt loading `define-package' and fail.
612- (unless skip-byte-compilation
613+ (if skip-byte-compilation
614+ ; ; FIXME: Think of a way of not even trying to build such files. Otherwise the
615+ ; ; output ("ELC blabla.el") is confusing.
616+ (eldev-verbose " Cancelled byte-compilation of `%s' : it has `no-byte-compile' local variable" source )
613617 (eldev-verbose (if recursive " Byte-compiling file `%s' early as `require' d from another file..." " Byte-compiling file `%s' ..." )
614618 source )
615619 (eldev-advised ('load :before
Original file line number Diff line number Diff line change 6060 (eldev--test-assert-files project-dir preexisting-files " src/project-l.elc" " src/project-l-misc.elc" " src/project-l-util.elc" )
6161 (should (= exit-code 0 )))))
6262
63+ (eldev-ert-defargtest eldev-compile-everything-8 (on-demand)
64+ (nil 'normal 'noisy )
65+ ; ; `project-j' has a file with `no-byte-compile' and autoloads.
66+ (eldev--test-without-files " project-j" (" project-j-autoloads.el" " project-j.elc" " project-j-advanced.elc" )
67+ (should (member " project-j-uncompilable.el" preexisting-files))
68+ (eldev--test-run nil ((eldev--test-on-demand-to-loading-mode-option on-demand) " compile" )
69+ (eldev--test-assert-files project-dir preexisting-files " project-j-autoloads.el" " project-j.elc" " project-j-advanced.elc" )
70+ (should (= exit-code 0 )))))
71+
6372
6473(ert-deftest eldev-compile-test-files-1 ()
6574 (eldev--test-without-files " project-a" (" test/project-a.elc" )
Original file line number Diff line number Diff line change 1+ ; ; -*- lexical-binding : t ; no-byte-compile : t -*-
2+
3+ ; ; Usage of `no-byte-compile' is not an accident: testing that such files are handled
4+ ; ; correctly too.
5+
6+ ;;;### autoload
7+ (defun project-j-never-compiled-hello ()
8+ ; ; Not requiring anything for this function: it must be autoloaded.
9+ (project-i-hello))
10+
11+ (provide 'project-j-uncompilable )
You can’t perform that action at this time.
0 commit comments