From a1945220d222455d8baf67c83c81eb509e6bdaab Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sun, 4 Oct 2020 17:26:35 -0700 Subject: [PATCH] use symbols for unique-key; tell conspack to intern them --- example/fancy.build | 6 ++---- src/fb-entry.lisp | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/example/fancy.build b/example/fancy.build index 0c41dee..60f35b7 100644 --- a/example/fancy.build +++ b/example/fancy.build @@ -65,7 +65,7 @@ (setf (slot-value b 'input-files) (slot-value b 'obj-files)) (setf (slot-value b 'output-files) (list (slot-value b 'target-binary))) (setf (slot-value b 'pretty-name) (slot-value b 'target-binary)) - (setf (slot-value b 'unique-key) (cons "c-binary-buildable" (cons (slot-value b 'target-binary) (slot-value b 'obj-files))))) + (setf (slot-value b 'unique-key) (cons 'c-binary-buildable (cons (slot-value b 'target-binary) (slot-value b 'obj-files))))) (defmethod do-build ((b c-binary-buildable)) (runp (format nil "cc -o ~a ~{~a~^ ~}" (slot-value b 'target-binary) (slot-value b 'obj-files)))) @@ -74,9 +74,7 @@ (setf (slot-value b 'input-files) (list (slot-value b 'source-file))) (setf (slot-value b 'output-files) (list (slot-value b 'obj-file))) (setf (slot-value b 'pretty-name) (slot-value b 'source-file)) - ; conspack doesn't automatically intern symbols so we have to use "c-source-buildable" instead of 'c-source-buildable - ; (because uninterned symbols aren't equal to anything) - (setf (slot-value b 'unique-key) (list "c-source-buildable" (slot-value b 'obj-file) (slot-value b 'source-file)))) + (setf (slot-value b 'unique-key) (list 'c-source-buildable (slot-value b 'obj-file) (slot-value b 'source-file)))) (defmethod do-build ((b c-source-buildable)) (ensure-directories-exist (directory-namestring (slot-value b 'obj-file))) diff --git a/src/fb-entry.lisp b/src/fb-entry.lisp index e4ba907..54cdcbd 100644 --- a/src/fb-entry.lisp +++ b/src/fb-entry.lisp @@ -20,7 +20,8 @@ :element-type '(unsigned-byte 8)) (let ((buf (make-array (file-length fp) :element-type '(unsigned-byte 8)))) (read-sequence buf fp) - (setf *global-cache* (conspack:decode buf))))) + (setf *global-cache* + (conspack:with-interning () (conspack:decode buf)))))) (load "fancy.build")