clojure-emacs/cljs-tooling

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.

Sounds reasonable. @cichli will you look into this?

@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))))

Oh, never mind, the problem's in cider-nrepl itself. Fixing now :-).