Fork me on GitHub
#figwheel-main
<
2018-09-07
>
gas00:09:11

@bhauman - cheers: I must have had typo somewhere. work like a charm for reagent with clj -A:fig:build and auto-testing as well as clj -A:fig:test and mac chrome headless

bhauman00:09:27

the new figwheel.main template has been deployed and it has testing built in

🎉 20
cjohansen12:09:14

hey, finally trying out figwheel-main. the new repl looks and behaves amazing!

cjohansen12:09:45

I am now trying to run figwheel-main in CIDER, and I can’t seem to find dedicated documentation - does anyone know of any?

cjohansen12:09:54

When I jack-in-cljs with this I kinda get a REPL, but I can only interact with it via a stdin: prompt in my minibuffer

cjohansen12:09:04

I guess maybe this is more of an emacs question…

schmandle13:09:25

@christian767 I found that with a current Cider everything "just works" once I removed all the little tweaks and hacks I had accumulated in my setup 🙂

cjohansen13:09:10

what does that mean - how do you set it up?

cjohansen13:09:21

just vanilla figwheel.main setup and then jack in?

schmandle13:09:32

minimal example that I have confirmed is working:

kjetil@nsdl37:~/Utvikling/fikenhjul$ cat deps.edn 
{:paths     ["src/cljs" "target"]
 :deps      {org.clojure/clojure             {:mvn/version "1.9.0"}
             org.clojure/clojurescript       {:mvn/version "1.10.339"}

             com.bhauman/figwheel-main       {:mvn/version "0.1.9"}
             nrepl/nrepl                     {:mvn/version "0.4.4"}}
 :aliases   {:dev {:extra-deps  {com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}
                   :main-opts   ["-m figwheel.main --build dev --repl"]}}}
kjetil@nsdl37:~/Utvikling/fikenhjul$ cat dev.cljs.edn 
^{:watch-dirs          ["src/cljs"]
  :open-file-command   "emacsclient" }
{:main              "fikenhjul.core"
 :output-dir        "target/public/js/out"
 :asset-path        "/js/out"
 :output-to         "target/public/js/fikenhjul.js"
 :optimizations     :none
 :pretty-print      true
 :source-map        true}

schmandle13:09:04

cider-20180826.1718

cjohansen13:09:33

thanks! will try it out

schmandle13:09:54

And I keep this in my .dir-locals.el to keep cider from asking too many questions:

((nil
   (cider-default-cljs-repl . figwheel-main)
   (cider-figwheel-main-default-options . ":dev")))

cjohansen13:09:07

that kinda gave me a REPL

cjohansen13:09:13

that immediately crashed with

cjohansen13:09:17

2018-09-07 15:40:09.119:INFO::nREPL-worker-0: Logging initialized @54319ms
Opening URL 
ExceptionInfo Expected REPL Connections Evaporated!  clojure.core/ex-info (core.clj:4739)

schmandle13:09:17

Does it work when launching from the cli?

schmandle13:09:31

do you have sayid installed in emacs?

cjohansen13:09:11

no, should I?

schmandle13:09:38

no, I ask because it is known to cause problems

schmandle13:09:25

I use spacemacs, and I need to have

(setq cljr-inject-dependencies-at-jack-in nil)
  (setq sayid-inject-dependencies-at-jack-in nil)
in my emacs config to make the latest cider work

cjohansen13:09:11

with figwheel.main, or any kind of CIDER REPL?

schmandle13:09:00

Not sure, but I think that would go for any cider repl

schmandle13:09:23

there is a conflict with the clojure deps cider auto injects

cjohansen13:09:14

thanks a lot 🙂

cjohansen13:09:12

now I’m seeing another issue. If I kill the repl buffer, and then try to jack in again, I get “Selecting deleted buffer”

schmandle13:09:38

Not really. I always do M-x cider-quit

cjohansen13:09:53

ok, will try that

schmandle13:09:09

I'll try just killing it

cjohansen13:09:14

I usually kill the buffer, haven’t seen that error before

cjohansen13:09:33

googled it, seems like an error that pops up in various situations

cjohansen13:09:50

M-x cider-quit was not followed by that error

schmandle13:09:37

I didnt get the error when just killing the buffer. It started up again just fine

cjohansen13:09:13

which Emacs version?

cjohansen14:09:18

I’m on 26, that may be the difference

cjohansen14:09:32

anyway, it’s working great now, I also got it working with node, which was my target

cjohansen14:09:53

guessing that missing cljr-inject-dependencies-at-jack-in cost me the past two hours :man-shrugging:

cjohansen14:09:58

thanks a lot for your help!

schmandle14:09:44

great! Gotta run. Thank you for "Parens of the dead". It helped me get into Clojure 🙂

cjohansen14:09:55

I think that one was Magnar only, but cool to hear 🙂

cjohansen14:09:33

anyway, glad to have helped more people into it so they can help my sorry ass 😂

schmandle14:09:42

Really? I seem to remember you were pairing?

cjohansen14:09:55

:thinking_face:

cjohansen14:09:35

I think we did the norwegian version together, and he did an English re-recording on his own

schmandle14:09:40

ah. it was called "Zombie cljs" perhaps. Its been a while 🙂