Skip to content

Commit

Permalink
Set print-symbols-bare to t while saving the build cache
Browse files Browse the repository at this point in the history
This fixes a bug where recipes may contain symbols with positions,
which have a printed representation but no read syntax, causing the
subsequent load of the build cache to fail. Symbols with positions may
be generated during the execution of the byte compiler.
  • Loading branch information
PythonNut committed Feb 21, 2024
1 parent b3760f5 commit b26befd
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions straight.el
Original file line number Diff line number Diff line change
Expand Up @@ -4260,11 +4260,16 @@ The name of the cache file is stored in
(straight--log 'modification-detection "Saving build cache")
(unless straight-safe-mode
(with-temp-buffer
;; Prevent mangling of the form being printed in the case that
;; this function was called by an `eval-expression' invocation
;; of `straight-use-package'.
(let ((print-level nil)
(print-length nil))
(let (;; Prevent mangling of the form being printed in the case that
;; this function was called by an `eval-expression' invocation
;; of `straight-use-package'.
(print-level nil)
(print-length nil)
;; Print symbols with attached positions, which can occur
;; during byte compilation, as bare symbols so they can be
;; read when loading the cache.
(print-symbols-bare t))
(ignore print-symbols-bare)
;; The version of the build cache.
(print straight--build-cache-version (current-buffer))
;; Record the current Emacs version. If a different version of
Expand Down

0 comments on commit b26befd

Please sign in to comment.