No info response should be nil instead of {}
Closed this issue · 4 comments
expez commented
The info op, for cljs, now returns {}
when nothing is found. I think we should be consistent with the return value for the clojure info op, which returns nil
. Using nil
allows us to use when-let
and friends to better effect.
cichli commented
@expez do you have a more specific test case? The following test passes w/o any code changes:
(testing "Returns nil for non-resolved syms"
(is (= nil
(info 'non-existent-var)
(info 'non-existent-var 'non-existent-ns)
(info 'non-existent-var 'cljs.core))))
cichli commented
Oh, never mind, the problem's in cider-nrepl
itself. Fixing now :-).
cichli commented
Should be fixed by clojure-emacs/cider-nrepl@21ff15d.