This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-08
Channels
- # announcements (6)
- # babashka (78)
- # beginners (84)
- # bristol-clojurians (5)
- # calva (50)
- # chlorine-clover (45)
- # cider (14)
- # clj-kondo (18)
- # cljs-dev (2)
- # clojars (2)
- # clojure (387)
- # clojure-android (3)
- # clojure-europe (6)
- # clojure-gamedev (3)
- # clojure-germany (3)
- # clojure-nl (18)
- # clojure-spec (5)
- # clojure-uk (36)
- # clojurescript (8)
- # clojurex (1)
- # conjure (1)
- # css (1)
- # cursive (32)
- # data-science (1)
- # datomic (11)
- # docker (61)
- # duct (17)
- # emacs (7)
- # figwheel-main (3)
- # fulcro (19)
- # jobs-discuss (3)
- # joker (1)
- # leiningen (23)
- # malli (11)
- # mount (6)
- # off-topic (30)
- # pathom (14)
- # pedestal (2)
- # phzr (1)
- # re-frame (11)
- # reagent (3)
- # reitit (5)
- # ring-swagger (3)
- # rum (1)
- # shadow-cljs (113)
- # slack-help (9)
- # spacemacs (16)
- # specter (4)
- # sql (14)
- # vscode (2)
- # windows (3)
- # xtdb (12)
Ugh, I'm positive there is a simple one (I've used it last year), but I really can't recall the name 😞
Btw, that Lein PR I mentioned is live https://github.com/technomancy/leiningen/pull/2673

G'day 🙂! I'm using Cider with Spacemacs and I'm loving it more and more. Though, I have two questions around running tests with cider-test-run-focused-test. 1. Is there a way to automatically save the current buffer in this situation? 2. Is there a way to prevent jumping to the cider-test-report window automatically in case of test failures?
Hi there, I have a test:
(deftest test-1
(is (= 1 (inc 1))))
When I run lein test
, then I get the output:
FAIL in (test-1) (test_lab.clj:19)
expected: (= 1 (inc 1))
actual: (not (= 1 2))
but inside Cider I get:
Fail in test-1
expected: 1
actual: 2
diff: - 1
+ 2
So it evaluates forms.
Can I change this behavior?Ugh, I'm positive there is a simple one (I've used it last year), but I really can't recall the name 😞
is there a way to eval a sexp with any parenting let
bindings? for example, I have
(let [x 1] (= 2 (+ x x)))
and I want to eval (+ x x)
without having to eval the parent sexp@mitchell_clojure yes, move your cursor to the position after the closing )
and use cider-eval-last-sexp
, which by default is bound to C-c C-e
I get an unable to resolve symbol error there, since it does not know what x is bound to
I'm looking for something more like cider-eval-last-sexp-in-context
, but which can infer the context of the defun
right, so when you want to test the inside scope, you need to bind x
. What some folks recommend is to execute (def x ...)
so that at he global scope you have a x
defined.
See this post which does a better job of explaining this process: https://blog.cognitect.com/blog/2017/6/5/repl-debugging-no-stacktrace-required
yeah, what I am saying is that our eval function could bind the vars if they are declared in parent let
s just by walking up the defun
but maybe that is more difficult to do than it appears on my first glance