{"action":"closed","issue":{"url":"https://api.github.com/repos/clojure-emacs/cider-nrepl/issues/293","labels_url":"https://api.github.com/repos/clojure-emacs/cider-nrepl/issues/293/labels{/name}","comments_url":"https://api.github.com/repos/clojure-emacs/cider-nrepl/issues/293/comments","events_url":"https://api.github.com/repos/clojure-emacs/cider-nrepl/issues/293/events","html_url":"https://github.com/clojure-emacs/cider-nrepl/issues/293","id":130516171,"number":293,"title":"Info middleware errors when getting eldoc for \".\" special operator","user":{"login":"sanjayl","id":7213170,"avatar_url":"https://avatars.githubusercontent.com/u/7213170?v=3","gravatar_id":"","url":"https://api.github.com/users/sanjayl","html_url":"https://github.com/sanjayl","followers_url":"https://api.github.com/users/sanjayl/followers","following_url":"https://api.github.com/users/sanjayl/following{/other_user}","gists_url":"https://api.github.com/users/sanjayl/gists{/gist_id}","starred_url":"https://api.github.com/users/sanjayl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanjayl/subscriptions","organizations_url":"https://api.github.com/users/sanjayl/orgs","repos_url":"https://api.github.com/users/sanjayl/repos","events_url":"https://api.github.com/users/sanjayl/events{/privacy}","received_events_url":"https://api.github.com/users/sanjayl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-01T23:17:04Z","updated_at":"2016-02-02T13:17:36Z","closed_at":"2016-02-02T13:17:36Z","body":"I get an ugly stack trace when I type the dot operator special form and trigger an eldoc query.\r\nHere's the code to reproduce:\r\n```clojure\r\n(ns cider.nrepl.middleware.eldoc-bug\r\n  (:require [cider.nrepl.test-session :as session]))\r\n\r\n(session/session-fixture #(session/message {:op \"eldoc\" :ns \"user\" :symbol \".\"}))\r\n```\r\nOr you can just open the cider-repl, type `(.` and then wait long enough to trigger a query.\r\n\r\nThe Exception gets thrown in the `extract-eldoc` function of `cider.nrepl.middleware.info` [lines 265-7.](https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/info.clj#L265-L267) \r\n```clojure\r\n(cond\r\n  (:special-form info) (->> (:forms info)\r\n                            (map vec))\r\n```\r\nThe call to `(:forms info)` for the dot operator returns:\r\n```clojure\r\n[( .instanceMember instance args* )\r\n ( .instanceMember Classname args* )\r\n ( Classname/staticMethod args* )\r\n Classname/staticField ]\r\n```\r\nThe last item of this collection causes `vec` to blow up since it's a symbol and not a coll.\r\n\r\nI guess it can be fixed by having the mapping function branch on type, but I thought it looked weird:\r\n```\r\n(->> (:forms info)\r\n     (map #(if (coll? %) (vec %) (vector %))\r\n```\r\nIs there a more idiomatic way of doing this?"}}