Fork me on GitHub
#cljsrn
<
2016-11-03
>
harrybin04:11:36

@seantempesta @tiensonqin I think it means :advanced compilation in the :prod :cljsbuild

harrybin04:11:50

Having some issues getting to a release apk with my re-natal app too

seantempesta05:11:45

Oh. I didn’t realize re-natal worked with advanced compilation. I’ve been using simple

tobiash08:11:00

hi! i am trying out re-natal, and it works great, except that development is very difficult since I do not get any meaningful stacktraces. The stack trace usually starts with customEval in figwheel-bridge.js

tobiash08:11:04

however, if I patch the file and add console.error(e.stack) instead of just console.error(e), at least I can see some clojurescript methods in the react-native log-android output

tobiash08:11:33

is there a way to get the proper stack to Redbox/Yellowbox dialog or in the log? Should this be patched in re-natal?

harrybin09:11:25

Are you developing with android or ios? I'm doing mostly android first and 'adb logcat' is helpful there.

tobiash09:11:43

android. But I dont see any mention of my exception in logcat

tobiash09:11:44

i think may depend on when the errors are thrown. In my case, there is a runtime exception when the js code is first evaluated, so it originates in figwheel-bridge.js where the eval call is. I'm pretty sure the error object there should be forwarded somewhere

tobiash09:11:10

other exceptions that happen later on may be caught otherwise

anmonteiro18:11:23

A few days ago there was a discussion in this channel about integrating Compassus with the React Native navigator @tobiash went ahead and figured it out in this example project: https://github.com/tobiash/rn-compassus-example/blob/master/src/rn_compassus/android/core.cljs

tobiash19:11:17

i am not sure it covers all aspects, and the downside is that you have to through the navigator to change the route

vikeri21:11:04

@tobiash I switched to boot-react-native to get better stack traces. They are better but still not ideal. To get the method that causes the trouble you'll sometimes have to go into the sources tab and set up "Pause at exceptions". Interesting with the e.stack option. Might very well be worth investigating more. My experience is that this area is not super well explored/sorted.

sineer21:11:18

@tobiash awesome!! Im working on the same thing and I'm loving your minimal example is great! Mine is a lot more complex because I am trying to get drawer+tabs working all at once... I definitly should've started with minimal use case like you did! I'm almost getting discouraged because of how complex it is still to have many stack-nav use same compassus app/reconciler but swap the root's query.. almost there 🙂

sineer21:11:42

I have same complaints about stack traces using re-natal a lot of times the traces is useless... I may investigate boot-react-native if that fixes that it would be a big plus!

tobiash21:11:49

happy to hear. i did the minimal example after getting rather frustrated working on my actual cljs project

tobiash21:11:11

i am using it with the drawer navigation from react-native-material-design

sineer21:11:52

interesting... I tested ex-nav's drawer and it seems to work great.. I'm about to test the tabs in my current compassus/ex-nav integration repo.

sineer21:11:26

I know ex-nav's drawer is plain AnndroidDrawerLayout too, haven't tried it on ios

tobiash21:11:01

@vikeri I investigated further, the figwheel-bridge has multiple ways of loading scripts, and while in some cases it uses plain eval and we could actually leverage more stack there, in other cases it uses importScripts (at least while running in chrome debugger), and simply doesnt seem to produce good stack trace information. so e.stack only helps when not using the debugger 😕

sineer21:11:51

ohhh! very insightful 🙂 thanks!

sineer21:11:28

I did remember having more relevent traces and was wondering why it's all gone now.. at least if turning off debugger can help then heh..

tobiash21:11:53

I'd be interested in trying boot-react-native, but there arent any recent commits on the project and even less documentation/blog posts than re-natal

tobiash21:11:45

@sineer ...well at least the stack traces I'm talking about are not actually output by re-natal

sineer21:11:30

right, its re-natal's figwheel bridge... still black magic to me I'm affraid

tobiash21:11:23

yes, it's a bit crazy. but I think it's down to the multitude of environments in which it can run

tobiash21:11:44

don't get me wrong, it's not bad code at all

sineer21:11:19

I just haven't tried to read/understand it yet. so much things to learn/understand I feel I keep hitting new taller walls every time I dig into something heh

tobiash21:11:41

but since I spent half the day on code connected to it, I'm not sure if figwheel is worth the effort. the code reload that react-native provides out of the box might be sufficient for me

sineer21:11:51

I have faith in figwheel hot reload 🙂 I was amazed how well source maps work now... all i'm missing is proper stack traces. I'm sure it'll get fixed soon enough 🙂