This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-17
Channels
- # bangalore-clj (1)
- # beginners (70)
- # boot (1)
- # cider (39)
- # cljs-dev (69)
- # clojure (56)
- # clojure-dev (1)
- # clojure-norway (1)
- # clojure-russia (4)
- # clojure-spec (1)
- # clojure-uk (10)
- # clojurescript (34)
- # clr (3)
- # community-development (3)
- # component (1)
- # datascript (1)
- # datomic (7)
- # emacs (1)
- # figwheel (3)
- # fulcro (5)
- # graphql (2)
- # hoplon (75)
- # jobs (4)
- # jobs-discuss (1)
- # luminus (15)
- # planck (3)
- # portkey (55)
- # re-frame (2)
- # reagent (2)
- # reitit (3)
- # ring (13)
- # ring-swagger (1)
- # shadow-cljs (72)
- # spacemacs (4)
- # tools-deps (2)
- # unrepl (7)
- # vim (2)
quick question - whenever I run cider-apropos-documentation
, it shows the docstring in the buffer but hitting RET just shows Symbol clojure.core/defn not resolved
- any ideas?
the actual was 2 big evaluated maps in the =
form. I guess just like standard clojure.tset
I was thinking maybe something more like humane-test
clj lib where I think it does something like a data diff on big things like that. It’s fine. I just wasn’t sure what this feature was for and couldn’t find any examples out there demonstrating it being used
I cannot reproduce @mikerod's strange outcome. Is there a minimal reproducible repo? Also make sure you're using latest CIDER to reproduce, and that you don't have anything in your .lein/profile.clj
that could be modifying the test output.
There is, however, a 🐛 w/ the interaction b/t cider-test-ediff
and the diffing functionality. With all comparisons besides =
(which we treat specially), the expected and actual are something like:
expected: (> 1 2)
actual: (not (> 1 2))
The cider-test-ediff
logic will look for the second form in actual
, expecting the first to always be not
.
W/ =
, however, we've modified the expected
and actual
. E.g. for (= 1 2 3)
:
expected: 1
actual: (2 3)
This means that cider-test-ediff
doesn't work properly in case of =
.
However, this seems to have nothing to do w/ @mikerod's result.@bozhidar It seems that the cider-test-ediff
functionality is really only designed w/ (= a b)
in mind. It doesn't handle (= a b c)
, (> a b)
, etc. gracefully.
W/ (> 1 2)
, for example, it will display (> 1 2)
in both buffers, which isn't very useful.
Oh, I'm able to reproduce @mikerod's result by using
(def a 1)
(def b 2)
(deftest foo-test
(is (> a b)))
Given this, it's not clear that cider-test-ediff
was ever useful :face_with_rolling_eyes:.
From clojure.test
's own documentation: https://github.com/clojure/clojure/blob/clojure-1.9.0/src/clj/clojure/test.clj#L40-L42
> The "expected:" line shows you the original expression, and the "actual:" shows you what actually happened.@mikerod You should be able to see the diff in the *cider-test-report*
buffer directly if you are using latest CIDER. That's what https://github.com/clojure-emacs/cider/pull/2172 added.
@mikerod https://github.com/clojure-emacs/cider/pull/2241 should now ediff the proper values. Give it a try.
@xiongtx Sorry for the delayed response. I am actually still using Cider 0.16.0. My case was with =
and 2 maps. I never messed with it enough yet to have a minimal repro. I will look at what you have linked here and I’ll see if I can give it a shot. The one thing that was holding me back from Cider 0.17 was that it broke with cljs or something (I just heard, didn’t experience), so I delayed since I’m still using it with a good amount of both clj and cljs.
@gonewest818 What's wrong here w/ elisp-lint
? https://travis-ci.org/clojure-emacs/cider/jobs/354827509
Indentation in cider-test.el is the error — but on my iPhone it’s difficult to see exactly what the complaint is.
The diffs in Emacs 25+ are a little more instructive.
It wants the conditions aligned with cond
rather than indented 2 spaces. I’m getting the same indenting in the *scratch*
buffer.
I'm using default Emacs Lisp indentation. cond
should be indented 2 spaces.
(cond
(foo bar)
(baz quux))
If that’s the case then I wonder how am I not getting the default, and neither is elisp-lint
… ?
I definitely see the appeal.
But we should stick to the mainstream Elisp indentation conventions - otherwise a lot of people would have trouble while contributing.
curious if anyone has any ideas on my issue
selecting any documentation via cider-apropos
et al just says the symbol is unresolved
Do you mean the symbol whose documentation you are selecting is unresolved?
So, for instance if I cider-apropos
I get this
clojure.core/cond
Macro: Takes a set of test/expr pairs.
clojure.core/cond->
Macro: Takes an expression and a set of test/form pairs.
clojure.core/cond->>
Macro: Takes an expression and a set of test/form pairs.
clojure.core/condp
Macro: Takes a binary predicate, an expression, and a set of
clauses.
clojure.core/reader-conditional
Function: Construct a data representation of a reader conditional.
clojure.core/reader-conditional?
Function: Return true if the value is the data representation of a
reader conditional
clojure.core/second
Function: Same as (first (next x))
clojure.tools.reader.impl.utils/second'
Function: (not documented)
cljs-tooling.util.misc/cond-let
Macro: An implementation of cond-let that is as similar as possible
to if-let.
And selecting, e.g. the first entry gets me the docs for “cond”. But you are saying, you select the first entry and you get “Symbol clojure.core/cond not resolved” …. is that accurate?