This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-30
Channels
- # bangalore-clj (1)
- # beginners (104)
- # boot (207)
- # cider (173)
- # cljs-dev (157)
- # cljsjs (1)
- # cljsrn (51)
- # clojure (196)
- # clojure-berlin (1)
- # clojure-chicago (1)
- # clojure-italy (4)
- # clojure-new-zealand (1)
- # clojure-nl (1)
- # clojure-russia (28)
- # clojure-spec (17)
- # clojure-uk (73)
- # clojured (13)
- # clojurescript (110)
- # core-async (4)
- # datascript (25)
- # datomic (92)
- # editors (1)
- # emacs (157)
- # events (4)
- # hoplon (16)
- # klipse (74)
- # lein-figwheel (10)
- # leiningen (2)
- # lumo (13)
- # off-topic (78)
- # om (3)
- # om-next (3)
- # onyx (14)
- # protorepl (1)
- # re-frame (17)
- # reagent (23)
- # remote-jobs (1)
- # ring-swagger (33)
- # schema (2)
- # slack-help (3)
- # spacemacs (7)
- # testing (1)
- # yada (7)
The latest version of cider broke cljs repl type customization for me, no matter the value of cider-cljs-lein-repl
cider always starts a rhino repl with cider-jack-in-clojurescript
I used to just set (cider-cljs-lein-repl . "(do (load-file \”script/dev.cljc\"))")
in my .dir-locals.el
, I also tried using setq but I get the same behavior
@jfntn latest Snapshot? Can you open an issue, if it is the latest Snapshot I changed some stuff in there
@richiardiandrea yes I saw that, was about to mention you 😉 Any ideas how I might go about trying to fix this in the meantime?
No I did not rename the var, I added to that boot and Gradle var and a cider-cljs-repl-form
that queries depending on the project
Maybe the logic is a bit off, I tried to reproduce the old behavior (of course), I will have a look today
Thanks for reporting and sorry about that @jfntn
Ok I think I saw what is going on
Yep but it will be another pr, Gradle is all over cider 😄
@dpsutton do you know what I need to add to my init.el
in order to format elisp code correctly (for instance describe
in cider tests) ?
yeah that's for clojure, what about elisp?
oh ok 😄
so, navigate to source, C-M-x
that badboy, pop back out to your describe form and reformat it
oh wow ok
yes I don't think I have
thanks I'll play with it
mmm if I require it I don't even have it in my emacs packages...ok
I will format manually, I want to try that problem above
I don't use elpa
but that's another story 😄
uhm, the test succeeds
not a very big elisp user here but:
(describe "cider-cljs-repl-form"
(before-each
(setq-local cider-cljs-lein-repl "(do (load-file \"script/dev.cljc\"))"))
(describe "when there overriding cider-cljs-lein-repl"
(it "returns the overridden form not the default"
(expect (cider-cljs-repl-form "lein") :to-equal "(do (load-file \"script/dev.cljc\"))"))))
uhm scratch that there is indeed a problem
@richiardiandrea ok cider-cljs-repl-form
works as expected with a cl-cases
instead of a pcase
it is weird, I have a successful test
what is the difference if I may ask? not a big elisp user
Hmm actually it might need more debugging because eventhough it says “starting a custom repl” nrepl doesn’t actually run my script
@jfntn did you try to ielm
on your buffer
buttercup
in cider you just make clean test
ok, whenever you have time, I will open a PR with the tests, we can talk there as well
Ran 254 specs, 0 failed, in 2.3 seconds.
ah, then it could be
@jfntn PR opened, thanks for reporting, you pushed me to add tests 😄
@dpsutton the test was reader conditional font-lock when cider is connected uses cider-reader-conditional-face
I have a more recent build `GNU Emacs 26.0.50.2 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1004)) of 2017-01-15 `
wow that's good that you guys try already against that
ah, I think @richiardiandrea is working on that
@ag what do you see?
All the tests pass here, do you have a dir-locals.el?
@richiardiandrea null pointer exception and long stacktrace related to weasel
yes, and my dir-locals.el
((nil . ((cider-boot-parameters . "repl -s wait")
(cider-cljs-lein-repl . "(boot (start))"))))
Ok @ag for your case you need to change to boot-cljs-boot-repl
are you using boot-repl-cljs
?
ah yes it is written there
I wonder what (boot (start))
is doing
another thing is, you could try to remove the dir local
because the default is to launch boot-cljs-repl/start-repl
(deftask start []
(future (boot (dev)))
identity)
it just wraps main task into a future, so it wouldn’t block the reploh no ok
so basically you are launching two repls it seems
I would actually try this in your case:
((nil . ((cider-boot-parameters . "start")))))
and you start will become
(deftask start []
(future (boot (dev)))
(comp (repl :server true) (wait))
when you jack in, at the bottom you should see the task called that is matching your start
it is basically same as my setup
((nil . (cider-boot-parameters . "dev-web"))))
which you will replace with start
yes there was one parent more up there
uhm, I did not try, let me see
missing paren yeah
ah ah, I should have add highlight maybe
test
clojure
(deftask start []
(future (boot (dev)))
(comp (repl :server true) (wait))
no it does not work like this 😄
of course 😄
@richiardiandrea Holy shit!!! that worked… this is so cool. I can’t thank you enough… this been killing me for the past couple of hours
no problem, that's good that it is solved!
you didn’t just fixed it, I couldn’t find a way to automatically start the cljs-repl, it would still have 2 separate clojure repls until I type in one of them (start-repl)
yeah your setup was a bit weird 😄
by the way, I think you could get rid of repl :server wait
even
because cider will always launch two repls
the second one is reduntant (unless you use it with another classpath)
well, to paraphrase Tolstoy: “All Sublime Text configs are alike; each Emacs config is weird and awesome in its own way"
oh yeah Tolstoy for sure was using emacs 😄
ah ah ha
that might actually be true, we should check the dates 😄
i was always confused why emacs would launch two clojure repls and then make one a cljs repl
@dpsutton absolutely, two separate clojure and clojurescript repls are amazing. Something I believe Cursive can’t do. Well it can’t do a lot more, to be honest
@dpsutton I don’t get what you’re saying. They are both indeed clojure repls (until one of them starts cljs-repl), and even after one becomes cljs-repl there’s always way to do :cljs.quit
and go back to clj repl
but its actually a clojure repl, and a clojure repl that just invoked whatever you invoke to get a cljs repl
because then you can evaluate clojure code in one and clojurescript code in another, without having to run :cljs.quit
and (start-repl)
back and forth
i'm not familiar with clojurescript, but it seems like they don't require a jvm at al