Hi, I'm using Edge and would like to add spec instrumentation into my (go)
function, where can I hook in? Any pointers much appreciated
This function is defined in lib.app.dev/src/dev_extras.clj
. You can probably just alter it directly, or require your own namespace instead of dev
and create your own version of go
that calls the original one.
ah ok, so i'll wrap it. thanks!
@conan not everyone will call (go)
so I would guess that's the wrong place to do that. cider users & vim users will pretty much only call (reset)
, or these days suspend
and resume
.
on top of that, you want to make sure this is only run once (go is idempotent and can be called multiple times). Don't have a good answer for you, but I think that's because that's how spec is supposed to work (based on Halloway's talks where he shared his flow).
I can't remember what exactly, but I had bad experiences with having global spec instrumentation on, and turned it off in the end.
It may be perceived as if reset
is deprecated. But among all these functions, only reset
actually calls repl/refresh
.
yep, and i need to instrument right after repl/refresh
i love it very much
@p-himik correct. But in emacs and vim (probably calva too) cider refresh can be used directly with suspend and resume. As of a week ago, projects are automatically configured that way in edge, so the cider-refresh binding is the easiest way for emacs users now. That is, vim, emacs and maybe vscode users never call repl/refresh.
Ahh, gotcha!