clerk

teodorlu 2023-11-03T07:02:59.161869Z

Good morning! If I want my own deftype to play nicely with clerk, should I implement valuehash.impl/CanonicalByteArray on it? https://github.com/arachne-framework/valuehash/blob/ff1d4b7f1260daf41c786a61cb45d02871b7baf9/src/valuehash/impl.clj#L5

mkvlr 2023-11-03T08:53:16.328309Z

good morning, we’re using a valuehash based on nippy

👍 1
mkvlr 2023-11-03T08:55:09.486189Z

you’ll proobably want to add it to nippy‘s freeze-serializable-allowlist

👍 1
mkvlr 2023-11-03T08:55:30.531599Z

(this should be in earmuffs, not bold)

👍 1
mkvlr 2023-11-03T08:57:32.590959Z

you should first try if nextjournal.clerk.analyzer/valuehash returns a non-deterministic value for your custom object

💯 1
teodorlu 2023-11-03T11:29:09.664259Z

Awesome, I'll start there. Thank you!

teodorlu 2023-11-08T12:10:10.057179Z

I checked that nextjournal.clerk.analyser/valuehash gave me the same hash each time I wanted the same type, and put my type into *freeze-serializable-allowlist*. That appears to have solved all my problems. Thanks again!

mkvlr 2023-11-08T12:51:43.285069Z

great to hear!