I'm analyzing some configuration data and I always reach for Clerk when I want to writecode my way through understanding something. I got to the point that clojure.spec seemed like it would be useful to apply to my problem, and now I'm getting some results where I don't know if (1) I just don't understand specs well enough (likely), or I'm using a workflow that is uncovering a confusion between Clerk caching and the registry where specs live (possible I guess? caching is out of my depth) 🧵
Opting out of caching was all I needed! I didn't realize that would do the right thing with the global registry, thank you
since spec uses a global registry it’s very likely to not play nice with caching
do things work okay if you opt out of caching in the namespace declaration?
btw there’s also clerk/clear-cache! which wipes both the in memory and disk cache
And then this happens, which is not what I expect:
I'm expecting :shell "cd docker" but invalid for the second one
but no!
i figure it's likely i'm holding one of these tools wrong but i have not been able to figure out how
and then, the next thing that happens is,
i go, wait could it be the '( list form? maybe i should use a different collection when i'm typing
so i
and suddenly
I don't know if many people are out here iteratively developing specs in clerk so it seems conceivable i found a crack, idk
when I uncomment a usage of that though,
(s/conform ::script ["cd docker" "./dockerify.sh"])
then I getStop Clerk. rm -rf ./clerk/cache. Restart clerk
eyyyy there we go
Ok cool. I now am getting the results I expect. I'm going to continue on doing my work, but let me know if I can help with this issue
HMM so then I thought maybe I should change some of the tag names, and I discover that rm -rf .clerk/cache is not a hard enough cache refresh
no error... and then, if I conform new data,
I can recover.... kind of..... if what I do is introduce new nonsense words.
Anyway I have removed .clerk/cache and .cpcache and the stale spec registration remains. Maybe this is a workflow issue and I should instead version my understandings like ::invocation-1