This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-21
Channels
- # announcements (1)
- # architecture (1)
- # beginners (125)
- # boot (6)
- # boot-dev (2)
- # calva (69)
- # cider (38)
- # cljs-dev (3)
- # clojure (212)
- # clojure-austin (7)
- # clojure-australia (1)
- # clojure-denver (2)
- # clojure-europe (3)
- # clojure-gamedev (1)
- # clojure-hamburg (8)
- # clojure-italy (10)
- # clojure-nl (31)
- # clojure-russia (3)
- # clojure-uk (57)
- # clojurescript (56)
- # core-async (3)
- # cursive (15)
- # datascript (1)
- # duct (28)
- # emacs (6)
- # events (1)
- # figwheel-main (11)
- # fulcro (22)
- # luminus (59)
- # lumo (2)
- # onyx (4)
- # overtone (1)
- # re-frame (1)
- # reagent (4)
- # remote-jobs (3)
- # rum (2)
- # shadow-cljs (84)
- # spacemacs (7)
- # speculative (5)
- # vim (1)
- # yada (127)
I run cider-jack-in-clj&cljs
and run (go)
in dev.clj
, which compiles the cljs once, but doesn't watch src
to recompile.
Then I try to run this in the clj repl that is supposed to become a cljs repl.
user> (require '[duct.repl.figwheel :refer [cljs-repl]])
nil
user> (cljs-repl)
Execution error (IllegalStateException) at cemerick.piggieback/cljs-repl (piggieback.clj:234).
Can't change/establish root binding of: *cljs-repl-env* with set
When I run cider-jack-in-clj&cljs
it asks which kind of repl, with the options figwheel
, figwheel-main
and others. The above error appears when I choose figwheel-main
. If I choose figwheel
it errors on startup complaining about invalid cljsbuild config
user> Execution error (ExceptionInfo) at figwheel-sidecar.config/raise-one-error (config.clj:478).
------ Figwheel Configuration Error ------
Missing required key :cljsbuild at path []
{:cljsbuild ...
^---- The required key :cljsbuild is missing
}
So, should I choose figwheel
, figwheel-main
or something else at jack-in
time? Do I need to set any extra variables in .dir-locals.el
to make this work?
@madstap It looks like you're using cemerick.piggieback rather than cider.piggieback. You might need to update your project.clj file and replace the piggieback dependencies with:
:dependencies [[cider/piggieback "0.3.10"]]
:repl-options {:init-ns user
:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}
I am using the lein new duct from yesterday, so that's what my project.clj looks like
Let me quickly check something.
Ah, whoops. It looks like the server.figwheel package wasn't updated to user cider.piggieback. Which is weird, because it worked fine for me in testing... perhaps some sort of dependency conflict that resolved in my favour but not in yours.
@madstap Unfortunately I don't think I can fix this until Thursday, but could you add an issue to https://github.com/duct-framework/server.figwheel so I don't forget?
Or you can open a PR to update the dependencies if you want.
Deps and requires
So here: https://github.com/duct-framework/server.figwheel/blob/master/project.clj
And here: https://github.com/duct-framework/server.figwheel/blob/master/src/duct/server/figwheel.clj
I'm not sure whether that's your only problem, but it seems like a good place to start. I've run into compatibility problems with piggieback as well since the Lein 2.8.3 update.
Yeah, I ran into some issues as well on another project which were fixed by upgrading cider and lein to the latest (so I didn't look any more into it)
Just to confirm though, when I run cider-jack-in-clj&cljs
I should choose figwheel-main
as the cljs repl type?
I need to investigate, but I believe there's an option for setting the commands you need to start the cljs repl.
One sec while I check.
Hm, Cider docs have no information on what the option does.
In another project I had some incantation in .dir-locals, some string with (do (require ',,,) (,,)
Ah, okay, they've changed how the whole cljs setup works. Not very backward-compatible of them, really.
And I'm not seeing a way to support the old functionality...