This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-11
Channels
- # announcements (6)
- # architecture (9)
- # beginners (120)
- # calva (13)
- # cider (28)
- # clj-kondo (8)
- # cljs-dev (7)
- # clojure (113)
- # clojure-europe (13)
- # clojure-italy (7)
- # clojure-nl (9)
- # clojure-spec (44)
- # clojure-uk (7)
- # clojuredesign-podcast (15)
- # clojurescript (18)
- # cursive (9)
- # data-science (3)
- # datomic (32)
- # defnpodcast (1)
- # events (2)
- # fulcro (6)
- # jobs (1)
- # kaocha (5)
- # london-clojurians (2)
- # luminus (2)
- # nyc (2)
- # off-topic (54)
- # ring (6)
- # shadow-cljs (136)
- # sql (1)
- # testing (2)
- # tools-deps (64)
- # vim (83)
I got a bunch of errors recently when working offline and just navigating around a file, it looks like eldoc is trying to connect to Clojuredocs and throwing an exception:
ERROR: Unhandled REPL handler exception processing message {:op eldoc, :ns ***, :symbol if-let, :session 40218e58-e5a0-427c-8f71-4b37ea36214f, :id 30160}
java.net.UnknownHostException:
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:220)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
at java.base/java.net.Socket.connect(Socket.java:591)
at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:285)
at java.base/sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:182)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569)
at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:265)
at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:372)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1181)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1075)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1581)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
...
Is it a known issue? I recall seeing discussion about it recently but couldn't find any mention on the github page
@qythium Supposedly we fixed this in the most recent Orchard release, which is used by CIDER 0.23.
I'm on 23.0 in emacs, but I start a repl in a terminal and then connect to it instead of jacking in, maybe the cider-nrepl dep is outdated
That's odd, I specified {cider/cider-nrepl "RELEASE"}
in my deps.edn thinking it would always pull the latest version, but it was in fact 0.21.1 according to clj -Stree
FYI - that’s the commit that adds the internet connectivity check https://github.com/clojure-emacs/orchard/commit/8f86b04990b9ba0b801b2eaa2abe1d941b07e920
I have no idea how to debug this further - any attempt to print values in the middleware functions results in a stackoverflow and having to restart the REPL
but it looks like inside cider.nrepl.middleware.track-state/make-transport
, the variable status
is expected to be a set but it gets passed a list (:nrepl.middleware.print/truncated)
here's an example input which triggers it, appears to be linked to the Emacs variable cider-print-quota
((fn gen [n]
(if (zero? n) 0 {n (repeat n (gen (dec n)) )}))
10)
Although in general non-streamed prints should continue to function normally, so I’m not quite sure what’s the triggering the unhandled error.
Btw, it seems your error is coming from the track-state
middleware, but we haven’t changed this in ages and I’m wondering how can something like this happen.
Basically it splits big results over multiple nREPL messages to improve the response time and to make it possible to interrupt printing some huge output.
This doesn't seem to be the case here? https://github.com/clojure-emacs/cider/blob/master/cider-client.el#L328
hmm, I didn't disable that by setting cider-print-quota
to nil, but changing the value of the quota changes the threshold where the error occurs.
even stranger, the error only happens in a project with dozens of dependencies (which I can't share here), and then only when the REPL session is started outside of emacs and connected instead of jacked in.
hi everybody! I see orchard.inspect/def-current-value
which is exactly what I was looking for but I see no reference to it in cider-nrepl, am I missing something or is just not implemented yet?