Improve autoloads mtime scanning on packages

Scan source files in build directory rather than repos, which are better
indicators of a stale autoloads file.
This commit is contained in:
Henrik Lissner 2019-07-26 20:13:08 +02:00
parent 9c1c61752a
commit 6fcaa80355
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -364,11 +364,11 @@ This should be run whenever your `doom!' block or update your packages."
(if (and (not force-p) (if (and (not force-p)
(file-exists-p doom-package-autoload-file) (file-exists-p doom-package-autoload-file)
(not (file-newer-than-file-p doom-elpa-dir doom-package-autoload-file)) (not (file-newer-than-file-p doom-elpa-dir doom-package-autoload-file))
(not (cl-loop for dir in (straight--directory-files (straight--repos-dir)) (not (cl-loop for dir in (straight--directory-files (straight--build-dir))
if (cl-find-if if (cl-find-if
(lambda (dir) (lambda (dir)
(file-newer-than-file-p dir doom-package-autoload-file)) (file-newer-than-file-p dir doom-package-autoload-file))
(doom-glob (straight--repos-dir dir) "*.el")) (doom-glob (straight--build-dir dir) "*.el"))
return t)) return t))
(not (cl-loop with doom-modules = (doom-modules) (not (cl-loop with doom-modules = (doom-modules)
for key being the hash-keys of doom-modules for key being the hash-keys of doom-modules