Is there a quicker way to get a react-native app to try to reconnect to the shadow-cljs server after it lost that connection (for example wifi reconnect) than re-starting the app with react-native run-android
?
hi. is there a way to depend on a cljs library which depends on npm libs, but tell shadow to not include the npm source in the build? or to put it another way, put :exclusions
on npm-deps
?
I see the bit about cdn and resolve-global here: https://shadow-cljs.github.io/docs/UsersGuide.html#js-resolve-global which would be handy if I could do the exclusions
@henryw374 :js-options {:resolve {"npm-dep" false}}
will "ignore" the dependency but fail if you actually attempt to use it in the code
:npm-deps {:install false}
in the shadow-cljs.edn
root will not attempt to install npm-deps from deps.cljs
at all, there are no specific exclusions otherwise
Awesome! thanks @thheller
I have a weird error that does this https://imgur.com/a/AuzL5iy and I am not sure how I could go about finding out where it is coming from.
It's in development
@ashnur looks like trying to print a self-referential structure of some kind. an atom that contains itself or so
can I assume it has to be a prn
? I don't use anything else that prints in my own code
could also be a str
call, but more likely prn
or pr-str
yes
I have much much more str than prn 🙂 Thanks, I should be able to find it
Probably not prn, because I have them all commented out. It's particularly bad because I can't consistently reproduce it, it always appears when I least expect it. I am writing here because when it happens, the first sign is that shadow-cljs notification appears saying "reconnecting".
I don't have the slightest clue what you are actually doing so I can't really comment. only you know how your data is structured and where it is sent. might not be your code, might be some library you use that tries to send data as EDN
fair, I didn't expect miracles, only if you or others saw something similar then I might've been lucky : )
I am betting on some react issue
(def x (atom {:x nil}))
-> (swap! x assoc :x x)
->
The result object failed to print. It is available via *1 if you want to interact with it.
The exception was:
RangeError: Maximum call stack size exceeded
:repl/print-error!
fairly simple to replicate the issue from the REPL, just gotta find it. might just be a missing deref somewhere
I don't have any atoms :-S
doesn't have to be an atom, just an example. ANY structure that can reference itself will have this issue
(def x #js {:x nil})
#'cljs.user/x
cljs.user=> x
#js {:x nil}
cljs.user=> (set! (.-x x) x)
The result object failed to print. It is available via *1 if you want to interact with it.
The exception was:
RangeError: Maximum call stack size exceeded
:repl/print-error!
Thanks for the elaboration on that, I am familiar with the js version of this (e.g. when json fails for circular references), with this knowledge I will be able to find it for sure.