cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
mafcocinco 2020-08-03T02:31:42.497500Z

I’m sorry for the lack of technical details WRT this question, but I’m kind of stumped. Under a standard configuration of CIDER, what is the difference, if any between launching a REPL via cider-jack-in vs. launching it from a terminal window with lein repl. The reason I ask is that I’m building a Clojure client library for FoundationDB and when I launch my REPL using lein repl from a terminal window, the classes from the FoundationDB java library load without a problem. However, when I try to load those same classes via the CIDER REPL, I get a NoClassDefFound exception when trying to use one of the imported classes (`com.apple.foundationdb.FDB`). The import works correctly but, implying the name is present. The error does not occur until I try to use the class. Just looking for some general guidance one where to look/ideas for debugging as my FoundationDB configuration appears to be correct (works from the terminal REPL) and I’m not really sure what to try next WRT debugging the REPL configuration within CIDER.

mafcocinco 2020-08-03T02:32:03.498Z

One other note, I check to see if there was a difference in classpath between the 2 REPL instances and there was not.

dpsutton 2020-08-03T02:51:16.499400Z

When you cider jack in it should print the startup command at the top of the repl. Try identical steps from “lein repl “ and then the version cider spits out

mafcocinco 2020-08-03T03:25:40.000200Z

Great suggestion, tried it and works from the terminal, still not working from CIDER.

mafcocinco 2020-08-03T03:32:27.001300Z

Found a work around with cider-connect. Since the process is working in my terminal with an nREPL running, I just pointed CIDER to that instance and it appears to be working fine. A little extra setup for this specific project, but it works!

dpsutton 2020-08-03T03:34:24.001600Z

Is this open source?

dpsutton 2020-08-03T03:34:44.002Z

I’d be interested in a minimal repro

mafcocinco 2020-08-03T03:45:52.002900Z

it is not but I’ll see if I can get a minimal OSS repo for you this week.

dpsutton 2020-08-03T03:52:53.003200Z

That would be great

bozhidar 2020-08-03T14:54:52.004Z

CIDER 0.26 (Nesebar) and nREPL 0.8 are out! More details - https://github.com/clojure-emacs/cider/releases/tag/v0.26.0 and https://metaredux.com/posts/2020/06/15/nrepl-0-8-evolving-the-protocol.html Special thanks to Clojurists Together for their support and to all the contributors for their help! Cheers! :cider:

🍻 1
5
richiardiandrea 2020-08-03T19:59:25.006400Z

Hi there, long time no see in this channel 😄 (the trend might change) I was wondering if cider has an option to stop asking for symbol to document on C-c C-d d - most of the times I want to ask for doc at point

dpsutton 2020-08-03T20:01:17.006600Z

@richiardiandrea

(defun cider-prompt-for-symbol-function (&optional invert)
  "Prompt for symbol if funcall `cider--should-prompt-for-symbol' is truthy.
Otherwise attempt to use the symbol at point for the command, and only
prompt if that throws an error.

INVERT is used to invert the semantics of the function `cider--should-prompt-for-symbol'."
  (if (cider--should-prompt-for-symbol invert)
      #'cider-read-symbol-name
    #'cider-try-symbol-at-point))

bozhidar 2020-08-04T08:03:03.010400Z

That's one default I will probably change at some point. Originally it wasn't prompting, someone pointed out that most similar command in Emacs were prompting and we needed to be consistent with them, so that's how we ended up here. I still don't see much value in the current default, though. I just got used to it. 🙂

yuhan 2020-08-06T02:38:14.013200Z

for what it's worth, both Spacemacs and Doom set that variable to nil as a "sensible default"

richiardiandrea 2020-08-03T20:01:43.006700Z

awesome, sorry I got lazy 😄

richiardiandrea 2020-08-03T20:01:49.006900Z

thank you very much

dpsutton 2020-08-03T20:01:55.007100Z

of course!