Commit 514a715f authored by  Hayley Patton's avatar Hayley Patton 🐢

COMPUTE-DEPENDENCIES returns string hashes, fix inconsistencies in renderers

parent 0b4df228
......@@ -74,7 +74,7 @@
(list (vague-object-schema-name vague-object))
(let ((reference-hashes '()))
(map-references (lambda (reference)
(push (reference-hash reference)
(push (bytes->base64 (reference-hash reference))
reference-hashes))
vague-object)
reference-hashes)
......
......@@ -55,7 +55,9 @@
(render-to-stream (computed-value-value computed-value)
stream)
(write-char #\) stream)
(write-char (if more? #\Space #\)) stream))))
(when more?
(write-char #\Space stream)))
(write-char #\) stream)))
(let* ((class (class-of object))
(table (netfarm-class-computed-slot-table class))
(slots (sort (string-hash-table->alist table)
......@@ -99,7 +101,8 @@ string; but RENDER-OBJECT will emit Netfarm standard format text."))
(setf (gethash "schema" (object-metadata object))
(netfarm-class-name (class-of object)))
(render-hash-table (object-metadata object) stream)
(terpri stream)
(unless (zerop (hash-table-count (object-metadata object)))
(terpri stream))
(write-line "---" stream)
(render-slots object stream)
(when emit-computed-values
......@@ -113,10 +116,12 @@ string; but RENDER-OBJECT will emit Netfarm standard format text."))
stream))
(write-line "---" stream)
(render-hash-table (vague-object-metadata object) stream)
(terpri stream)
(unless (zerop (hash-table-count (vague-object-metadata object)))
(terpri stream))
(write-line "---" stream)
(render-hash-table (vague-object-values object) stream)
(terpri stream)
(unless (zerop (hash-table-count (vague-object-values object)))
(terpri stream))
(when emit-computed-values
(maybe-write-vague-computed-values object stream)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment