Fork me on GitHub
#shadow-cljs
<
2020-11-02
>
bendlas12:11:34

Does anybody here use cljs.spec.test.alpha/instrument? I just ran into an error, where a var only became instrumented, after deleting .cpcache. Just a restart and regular clean didn't help ...

bendlas12:11:55

adding the ns calling instrument to :cache-blockers should fix it though, right?

thheller12:11:39

instrument is a rather difficult beast since it is a macro

thheller12:11:06

it isn't so much about the ns calling instrument, it is more about ensuring that that ns is compiled after all the namespaces you want to be instrumented

thheller12:11:23

so the ns calling it should directly require all the namespaces

thheller12:11:18

so I doubt that .cpcache or any cache really had anything to do with it

thheller12:11:43

rather you were maybe instrumenting a var that just happened to still be compiling when instrument was already running due to parallel compile

bendlas12:11:53

you mean "directly" as in "transitively"? because that's what we already did.

bendlas12:11:09

I'm using the no-argument version of instrument, that would instrument all specced vars. After adding the transitively dependent namespace, that also calls instrument, to :cache-blockers, it seems fine ..

thheller12:11:52

yes if you require transitively then the ns calling the instrument might not recompile

thheller12:11:57

if you require directly it will

thheller12:11:19

so blocking the cache or (ns ^:dev/always this.calls.instrument) works too

thheller12:11:00

since it is a macro is must be recompiled to reflect the changes done in other namespaces

bendlas12:11:11

ok, that's good. because fn-specs are already used pervasively throughout the project, and will be used even more in the future ..

Old account17:11:16

Hello! I wonder how do you debug (with stepping debuger) CLJS code when compiling with shadow? I use Cursive IDE so it would be also nice to find out how that works with debugging.

thheller21:11:51

@stebokas it doesn't work. you can use the chrome built-in debugger a little bit but thats about it.

👍 3