This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # beginners (21)
- # calva (2)
- # cider (26)
- # clj-kondo (5)
- # cljdoc (4)
- # cljsrn (1)
- # clojure (42)
- # clojure-spec (5)
- # clojure-uk (1)
- # clojurescript (45)
- # cursive (5)
- # data-science (1)
- # datomic (5)
- # emacs (6)
- # fulcro (18)
- # hoplon (8)
- # immutant (1)
- # joker (9)
- # nyc (1)
- # off-topic (72)
- # re-frame (3)
- # reitit (1)
- # rewrite-clj (11)
- # shadow-cljs (9)
- # tools-deps (70)
When running some of the test functions, i notice it doesn't eval beforehand, is there a setting to have cider save/eval before, or do I just have to bind to a custom fn that does that?
On my local branch of cider I simply edited
cider-test-run-test to do
(cider-eval-defun-at-point) before executing the test in a clojure-mode buffer, there doesn't seem to be an existing setting for it.
I think it should be a default behaviour, it doesn't make sense to edit a test and then run the outdated version
I think we avoided it initially simply because we didn’t want to trigger unwanted side-effects from the code under test.
FWIW, Spacemacs does a more extreme version of this by default, binding
<leader>t t to a custom fn that re-evals the entire buffer before running the test:
(defun spacemacs/cider-test-run-focused-test () "Run test around point." (interactive) (cider-load-buffer) (cider-test-run-test))
Well, that’s an easy change and I’d be fine with adding customizations to auto-eval the test at point or the entire buffer.
There’s also a
cider-auto-test mode which does a similar thing when it’s enabled and you’re changing code.
@bozhidar it had been a good long while since i've been doing clojure stuff (rather than clojurescript). Now i'm hitting a problem with cider specific to windows and deps.edn project. When i try to jack-in and select "clojure-cli", i get "the clojure executable isn't on your 'exec-path'"... This is completely normal as there is no clojure command to execute, it lives in powershell, there is no file to execute. While doing shadow-cljs work, i worked around this by having a clojure.cmd file in the root of my project directory, which, i guess, shadow-cljs was calling. This in turn was executing poweshell and the clojrue command within it. Looking at the source code in cider.el I think I already see one problem : you're looking for .bat files and not .cmd, both should be looked up. I cannot put this clojure.cmd (or .bat) file in the path, because then powershell will recurse calling it, rather than using its internally added clojure command. So i'll rename my cmd file to a bat file, but how can i make cider call it in the root of my project ?
i think in this regard, calling clojure with double quotes outside the -Sdeps parameter rather than single quotes, and \" inside that string is the most compatible way to do it
This might provide some related relevant info https://clojure.atlassian.net/browse/TDEPS-133
then changed cider.el to use the double quote parameters with escaped double quotes inside those
I'm using figwheel-main, doing a cider-jack-in-cljs, and almost everything works, I get a
[Figwheel] Successfully compiled, it opens my browser on the dev page, but my clj repl doesn't turn into a cljs repl, and the repl doesn't seem to work. I don't get any error message and I don't know what's wrong. It worked yesterday but I can't figure out what is different today. 😕
If I try to use the repl it gets stuck with that loading animation going on ->
does your deps.edn file have any main or main args (i forget what its called). Tutorials for figwheel-main tell you to set some main args. If you put these, CIDER cranks up unhappy. If you omit them, it works just fine. Is this perhaps your issue?
Hm I found this in my project directory
lrwxrwxrwx 1 oskar oskar 28 Jun 23 16:34 .#core.cljs -> [email protected]:1561292340 and removed it, and now it works. What was that? 😛