diff options
author | Arun Isaac | 2025-01-29 14:07:09 +0000 |
---|---|---|
committer | Arun Isaac | 2025-01-29 14:53:59 +0000 |
commit | e7b865061843307f357dafe712b0dfd03c790269 (patch) | |
tree | 38fea43af4c1fff1600477d3934779f687998817 /ennum.el | |
parent | c5c386f669cb5fd496006d01dddcdc9e3d8f4d16 (diff) | |
download | ennum-e7b865061843307f357dafe712b0dfd03c790269.tar.gz ennum-e7b865061843307f357dafe712b0dfd03c790269.tar.lz ennum-e7b865061843307f357dafe712b0dfd03c790269.zip |
Do not track features.
Let us not track features. It is not possible to guarantee such strong
controls without spawning a separate inferior process for the build.
Also, many features put in non-reproducible values such as dates and
times that disrupt the caching. If variables or functions are mutated,
rebuilding manually is the user's problem. For final publishing,
continuous integration systems need to be used anyway.
* ennum.el (ennum-track-features, ennum-feature-hash): Delete
variables.
(ennum--feature-environment): Delete function.
(ennum-eval): Do not print ennum-feature-hash.
(ennum-publish): Do not recompute ennum-feature-hash.
Diffstat (limited to 'ennum.el')
-rw-r--r-- | ennum.el | 34 |
1 files changed, 0 insertions, 34 deletions
@@ -141,14 +141,6 @@ to delete. If the store path is relative, it is interpreted relative to `:working-directory'. Defaults to \".ennum\"." :group 'ennum) -(defvar ennum-track-features - '(ennum ennum-html ennum-image ob-tangle org ox ox-html) - "List of features to track on expression evaluation.") - -(defvar ennum-feature-hash - nil - "List of hashes tracking current state of features.") - (defmacro ennum-with-file-contents (file &rest body) "Create a temporary buffer, insert contents of FILE into that buffer and evaluate BODY. The value returned is the value of the @@ -221,28 +213,6 @@ respectively by - and _, and the pad character = is optional." (insert file) (ennum--hash))) -(defun ennum--feature-environment (feature) - "Return hash of the current state of FEATURE. - -The returned hash is the hash of the file providing FEATURE, and -the current state of all its variables." - (pcase (feature-symbols feature) - (`(,file . ,entries) - (with-temp-buffer - ;; Print hash of file. - (print (ennum-file-hash file) (current-buffer)) - ;; Print variables and their values. - (dolist (variable entries) - (print (if (and (atom variable) - (boundp variable) - ;; Exclude `ennum-feature-hash' since it - ;; is meant to be changed on each run. - (not (eq variable 'ennum-feature-hash))) - (cons variable (symbol-value variable)) - variable) - (current-buffer))) - (ennum--hash))))) - (defun ennum--set-file-modes-recursively (directory directory-mode file-mode executable-file-mode) (chmod directory directory-mode) (dolist (file (ennum-directory-files directory t t)) @@ -261,7 +231,6 @@ the current state of all its variables." (with-temp-buffer (let ((print-length nil) (print-level nil)) - (print ennum-feature-hash (current-buffer)) (print closure (current-buffer))) (ennum--hash)) (ennum-setting :store)))) @@ -806,9 +775,6 @@ as keys. Keys are compared using `equal'." (defun ennum-publish () (interactive) - ;; Recompute feature hash. - (setq ennum-feature-hash - (seq-map 'ennum--feature-environment ennum-track-features)) (ennum-with-current-directory (ennum-setting :working-directory) (let* ((blog-title (ennum-setting :blog-title)) (posts (ennum-posts (ennum-setting :posts-directory))) |