Closed thheller closed 4 years ago
Thanks @thheller :smiley: We will do this in re-frame-debux
within the next couple of days :+1: It is definitely something that shadow-cljs shouldn't have to special-case for us. Its also a good solution because it is backwards compatible with the current way of doing things for those using other tools.
Nice. Thanks.
Currently it is recommended to include the
tracing-stubs
library on the classpath for "release" builds but this requires changing the classpath which shadow-cljs currently does not support on its own. It does however support aliasing namespaces so it can achieve the same result without actually switching the classpath.Instead of having a separate package that just replaces the
day8.re-frame.tracing
ns with one that does nothing it would be nice to have those stubs instead included as a separate namespace as part of the regular tracing package. Maybe namedday8.re-frame.tracing-stubs
orday8.re-frame.tracing-noop
.In a
shadow-cljs
build config the user can then specifyThis redirects every
(:require [day8.re-frame.tracing :as x])
to use the stubs instead in arelease
build and development builds just use the regular code. I think this is an easier method than messing with the classpath. It is however only supported by shadow-cljs.I can just include those tracing stubs in shadow-cljs itself if you prefer to keep these black magic tricks out of your package. ;)