Fork me on GitHub
#untangled
<
2016-04-03
>
jimmy02:04:39

@tony.kay: good point. Thanks simple_smile

vmarcinko18:04:36

Hi, I almost set up everything to finally start learning Untangled, but since I am total CLJS newbie, I stumbled upon this problem with todomvc app.. When I start client/figwheel REPL, and I am currently in cljs.user namespace, I get following error when I try to fetch core/app :

cljs.user=> core/app
WARNING: No such namespace: core, could not locate core.cljs, core.cljc, or Closure namespace "" at line 1 <cljs repl>
WARNING: Use of undeclared Var core/app at line 1 <cljs repl>
#object[ReferenceError ReferenceError: core is not defined]

vmarcinko18:04:57

anyone has idea why this happens? I reckon I should get a handle on this core/app without a problem, because as far as I see it, in dev/client/cljs/user.cljs this core namespace is required:

[untangled-todomvc.core :as core]

vmarcinko18:04:20

And strangely, (log-app-state) dumps the state to console as it should, and it uses thsi core/app inside itself, so dunno why my fetch of this atom doesn't work?!

vmarcinko18:04:19

I tried several times to disable cache, do lein clean and restart the REPLs

cjmurphy18:04:53

To start it I just have a run.sh with this in it: JVM_OPTS="-Ddev -Dtest" lein run -m clojure.main script/figwheel.clj

cjmurphy18:04:44

There's no real need to use a REPL when you have figwheel doing live code reloading for you.

tony.kay19:04:15

@vmarcinko: So, the REPL is nice for looking at app state. Did you make sure you started a pplain clojure main REPL and not a nREPL? I don’t personally use nREPL because you have to mess with it a lot (piggieback etc) to get it to play well.

tony.kay19:04:48

two of our guys use Emacs/Vim with nREPL, but I’m not sure what hoops they jump through.

tony.kay19:04:37

BTW, @cjmurphy There is a Makefile with that in it: make dev

tony.kay19:04:17

@vmarcinko: Also, if you start more than one build, your REPL may be attached to a different browser tab than your app! E.g. see :cljs/quit, which allows you to point the REPL at a particular browser tab/env (e.g. tests vs dev, etc)

tony.kay19:04:27

Oh, actually, I see the same problem. Probably an env bug. If you edit/save the user.cljs file it starts working….either way the log-app-state is better, since it doesn’t show you all of the mess in the app atom itself.

cjmurphy19:04:37

Just noticed what IntelliJ/Cursive hides - Makefile and package.json - can't actually see these through the IDE.