This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-23
Channels
- # announcements (4)
- # bangalore-clj (1)
- # beginners (56)
- # cider (24)
- # clojure (71)
- # clojure-dev (21)
- # clojure-nl (2)
- # clojure-russia (1)
- # clojure-spec (5)
- # clojure-uk (10)
- # clojured (8)
- # core-logic (18)
- # cursive (6)
- # data-science (15)
- # duct (1)
- # figwheel-main (4)
- # fulcro (6)
- # graphql (2)
- # luminus (4)
- # nrepl (9)
- # off-topic (10)
- # pathom (10)
- # pedestal (3)
- # re-frame (10)
- # ring-swagger (1)
- # shadow-cljs (19)
- # vim (35)
so with huge thanks to @dominicm I seem to have a working fireplace + tools.deps + figwheel connection via piggieback … I made a bunch of notes on the github issue and hope this is helpful … it’d be better if it didn’t require patching fireplace, but, well, it does work for me: https://github.com/rgm/reframe-template/issues/1#issuecomment-466619263
of course so now I’m reading https://figwheel.org/docs/vim.html a bit more closely
and it seems that yep, it says right there that I should be starting a terminal cljs-repl first, and then connecting Piggieback
maybe it’s just me but fireplace’s :Piggieback
command seems a bit … suprising. Straight :Piggieback
will start Nashorn on its own and :Piggieback 9000
will start a stock CLJS browser repl, whereas :Connect
doesn’t start anything; it just connects to an existing nrepl server.
Where I think I got confused was extrapolating and assuming that :Piggieback (figwheel.main.api/cljs-repl "dev")
would start a Figwheel repl, and it doesn’t. It seems to behave more like :Connect
(which seems to be the interplay between figwheel and fireplace; it doesn’t seem like anyone set out to make this inconsistent).
Personally, I'm happy it works like :Connect. CIDER doesn't behave that way, and it breaks edge.
Yeah, I agree. I find the fallback behaviour of starting a completely separate headless JS engine with (usually) different compiler options to be very confusing. I’d rather it fail fast and then I know it’s not connecting properly, versus getting odd messages around eg. js/alert missing (because headless), or not being able to find a foreign lib (because not using the right compiler opts).
I don’t get why :Piggieback
ignored the repl-env I gave it, but that’s just curiosity now; I know how to force it to do what I want.
If you're ending up in empty(a:args)
, that would imply you're running :Piggieback
, rather than :Piggieback foo
That was my read of the docs too. But ... with that eval(“nil”) and swapping in Figwheel for nashorn it works on my machine, and without both. It doesn’t. Something screwy with my machine I guess.
It does work with tdeps&nrepl, nrepl alone is enough, but has reduced functionality. I would highly recommend using cider
`Execution error (FileNotFoundException) at user/eval5301 (REPL:1). Could not locate dev__init.class, dev.clj or dev.cljc on classpath. Error detected while processing function <SNR>32_Doc[1]..fireplace#info[39]..fireplace#evalparse: line 12: E605: Exception not caught: Clojure: class java.io.FileNotFoundException`
This usually happens if you're in dev.clj, but haven't saved yet. Or if you haven't started with the dev alias.
Ok, let me try, I started with clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.21.1"} }}' -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["cider.nrepl/cider-middleware"])'
when I type cpp
on some forms and keep typing, characters start being replaced, why is that?
what happens is I keep pressing p
after cpp
on some, sometimes it works, sometimes it doesn't https://asciinema.org/a/Q8EVFHTLC3hbGFyOgRzXnwUDu