Fork me on GitHub
#cider
<
2020-05-03
>
myguidingstar16:05:23

Is there any command in cider to forcefully stop an eval that takes too long (or an infinite loop)?

dpsutton16:05:06

C-c C-c is bound to cider-interrupt

myguidingstar16:05:30

Just found it. Thanks. It's bound to C-c C-b in Doom Emacs

bozhidar06:05:09

It’s C-c C-c in a REPL and C-c C-b in a source buffer.

dpsutton16:05:46

possibly both. i saw that one in CIDER as well

cdimara18:05:39

does anyone know how to get specify to cider which JVM to use? Everything on my system is using java 11 except for cider which is using java 13. Don't know how to tell it not to do that.

dpsutton18:05:32

M-: (shell-command-to-string "which java")

dpsutton18:05:57

CIDER is just gonna call clj ... or lein ... so its really finding out which java is visible to emacs

cdimara18:05:33

so it says its using "/usr/bin/java' but I checked "/usr/bin/java" and its version is 11 in the terminal

cdimara18:05:16

I used (shell-command-to-string "java -version") and it says 11

cdimara18:05:57

cider-jack-in says its using java 13 tho

dpsutton18:05:29

is this a clj deps project?

cdimara18:05:44

I noticed this while working in a project, but this happens even without a project.

cdimara18:05:58

it was a clj deps project tho

dpsutton18:05:06

same issue when using lein?

dpsutton18:05:12

ie without a project

cdimara18:05:17

Nope. lein repl without a project is Java 11

dpsutton18:05:19

ok. i wonder if its this from clojure:

# Find java executable
set +e
JAVA_CMD=$(type -p java)
set -e
if [[ ! -n "$JAVA_CMD" ]]; then
  if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
    JAVA_CMD="$JAVA_HOME/bin/java"
  else
    >&2 echo "Couldn't find 'java'. Please set JAVA_HOME."
    exit 1
  fi
fi

dpsutton18:05:29

it can fall back to java_home.

dpsutton18:05:35

that's the only thing i can think of right now. you can test it by running eshell and trying clojure

cdimara18:05:57

ooh that's a good lead. Thank you!