Skip to content

No info response should be nil instead of {} #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
expez opened this issue Aug 18, 2015 · 4 comments
Closed

No info response should be nil instead of {} #21

expez opened this issue Aug 18, 2015 · 4 comments
Assignees

Comments

@expez
Copy link
Member

expez commented Aug 18, 2015

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.

@bbatsov
Copy link
Member

bbatsov commented Aug 31, 2015

Sounds reasonable. @cichli will you look into this?

@cichli cichli self-assigned this Sep 1, 2015
@cichli
Copy link
Member

cichli commented Sep 1, 2015

@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
Copy link
Member

cichli commented Sep 1, 2015

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

@cichli
Copy link
Member

cichli commented Sep 1, 2015

Should be fixed by clojure-emacs/cider-nrepl@21ff15d.

@cichli cichli closed this as completed Sep 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants