Fork me on GitHub
#shadow-cljs
<
2020-02-22
>
Parenoid00:02:01

I am noticing that every change to App.js in that case causes the hardware simulator to rebuild and load the app, whereas the non cljs expo approach automagically reloads the change fairly instantly without a rebuild and download the javascript bundle to the device... does anyone have experience with getting the latter thing going with cljs (or who can redirect me to a good channel to ask)?

Parenoid00:02:13

OK, disregard all that... had to disable live reload on the expo app on my device and now it works as expected (as mentioned in the repo readme 😳 )

Parenoid00:02:58

it's a bit slower, but not bothersomely so... probably because of the cljs->js phase.

Parenoid00:02:14

any random suggestions/thoughts/projects on this theme are welcome though (either here or by DM).

Parenoid00:02:29

oookay... here is a more specific question: when following the 'Using Emacs with CIDER' approach at https://github.com/PEZ/rn-rf-shadow everything works, I can (js/alert "foobar") from the cljs.user> repl inside emacs, and everything is good... however, I can't cider-eval-defun-at-point anything inside my app.cljs buffer in emacs... is it possible to be able to do that?

Parenoid00:02:18

I tried it all again this time using cider-jack-in-clj&cljs and when evaluating (+ 1 1) in directly in the emacs app.cljs buffer I got an java.lang.RuntimeException Unable to resolve symbol: + in this context error... hmm.

Parenoid01:02:25

ok, fixed... setting the buffer to clojurescript-mode fixed the problem.

👍 4
Kurt Sys21:02:25

I have some issues with babel and shadow-cljs. I guess the babel version in shadow-cljs (2.7.0) I was using didn't support all the plugins (for rest destructuring) I need since one of the dependencies (luxon) needed to be upgraded due to some weird behaviour in chrome 80+. The first thing I tried: upgrade shadow-cljs. However, when upgrading to 2.8.83, I get this error:

$ yarn cljs:watch
yarn run v1.21.1
$ shadow-cljs watch app
shadow-cljs - config: .../shadow-cljs.edn  cli version: 2.8.83  node: v10.15.2
shadow-cljs - running: lein run -m shadow.cljs.devtools.cli --npm watch app
Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: tap> in this context, compiling:(shadow/debug.clj:36:3)
	at clojure.lang.Compiler.analyze(Compiler.java:6792)

Kurt Sys21:02:50

(when I run just yarn babel ... , all works fine, so I'm sure I need an upgraded version of babel - so probably I need an upgraded version of shadow-cljs). However, not sure why shadow-cljs seems to have issues with watch app

Kurt Sys21:02:34

btw, in package.json, I have a script "cljs:watch": "shadow-cljs watch app"

Kurt Sys21:02:45

What am I missing?

thheller21:02:16

tap> missing means you are not using clojure 1.10.1

Kurt Sys21:02:16

oh, nvm, found it.

Kurt Sys21:02:51

besides the fact that it's (most probably) solved: is there a way to choose which version of babel is used when using shadow-cljs? (I added some to package.json, but they don't help out when running watch app...)

thheller21:02:29

there is not no