cider

2025-11-18T17:15:03.570839Z

all of my tests are returning this thing as error

dpsutton 2025-11-18T17:18:19.085039Z

can you verify how your tests behave outside of CIDER?

clj
(require 'some-test.ns 'clojure.test)
(clojure.test/run-tests 'some-test.ns)

oyakushev 2025-11-18T17:29:36.382629Z

Hi! This is probably the result of recent nREPL changes. Can you check which versions of nrepl and cider-nrepl you have on classpath? M-x cider-classpath

2025-11-18T17:36:55.600959Z

> can you verify how your tests behave outside of CIDER? The tests behave well

2025-11-18T17:38:20.489699Z

/Users/ian.santos/.m2/repository/cider/cider-nrepl/0.47.1/cider-nrepl-0.47.1.jar

2025-11-18T17:38:42.057039Z

/Users/ian.santos/.m2/repository/nrepl/nrepl/1.5.1/nrepl-1.5.1.jar

oyakushev 2025-11-18T17:39:25.089039Z

nREPL is latest but cider-nrepl is more than a year old. Could you upgrade to the latest version and please try again?

2025-11-18T17:40:06.595329Z

okkk

2025-11-18T17:42:12.458129Z

forgot how to upgrade cider, how to do it?

2025-11-18T17:42:29.011399Z

/opt/homebrew/bin/clojure -Sdeps \{\:deps\ \{nrepl/nrepl\ \{\:mvn/version\ \"1.5.1\"\}\ cider/cider-nrepl\ \{\:mvn/version\ \"0.58.0\"\}\}\ \:aliases\ \{\:cider/nrepl\ \{\:main-opts\ \[\"-m\"\ \"nrepl.cmdline\"\ \"--middleware\"\ \"\[cider.nrepl/cider-middleware\]\"\]\}\}\} -M:dev:repl:cider/nrepl

oyakushev 2025-11-18T17:43:09.464939Z

OK, so when you jack in, the correct version is supplied, but you probably have an alias that contains the old version in ~/.clojure/deps.edn or in the deps.edn of the project itself.

2025-11-18T17:43:19.128449Z

ah ok

2025-11-18T17:43:31.527499Z

it's always inside the global deps.edn

2025-11-18T17:43:32.341939Z

ok

2025-11-18T17:43:54.968309Z

cause the jack-in command is giving me that

2025-11-18T17:44:49.593429Z

ah

2025-11-18T17:44:58.633099Z

ok, it was the project that was getting a older vx

2025-11-18T17:44:59.852459Z

thx

2025-11-18T17:46:13.686839Z

but same error is happening

oyakushev 2025-11-18T17:47:26.761779Z

Alright. Thanks for upgrading still, it is useful to know you run the latest code before investigating

oyakushev 2025-11-18T17:47:46.563929Z

Could you please try this in any other project? I mean running the tests

2025-11-18T17:49:02.694329Z

my-test-namespace> (my-51-test)

ERROR in (my-51-test) (UTF_8.java:81)
Uncaught exception, not in assertion.
expected: nil
  actual: java.lang.StackOverflowError: null
 at sun.nio.cs.UTF_8.updatePositions (UTF_8.java:81)
    sun.nio.cs.UTF_8$Encoder.encodeArrayLoop (UTF_8.java:462)
    sun.nio.cs.UTF_8$Encoder.encodeLoop (UTF_8.java:563)
    java.nio.charset.CharsetEncoder.encode (CharsetEncoder.java:587)
    sun.nio.cs.StreamEncoder.implWrite (StreamEncoder.java:280)
    sun.nio.cs.StreamEncoder.implWrite (StreamEncoder.java:267)
    sun.nio.cs.StreamEncoder.write (StreamEncoder.java:122)
   java.io.OutputStreamWriter.write (OutputStreamWriter.java:206)
    java.io.BufferedWriter.flushBuffer (BufferedWriter.java:168)
    java.io.BufferedWriter.flush (BufferedWriter.java:305)
    cider.nrepl.middleware.out$print_stream$fn__6852.invoke (out.clj:147)
    cider.nrepl.middleware.out.proxy$java.io.OutputStream$ff19274a.flush (:-1)
    java.io.PrintStream.flush (PrintStream.java:406)
    sun.nio.cs.StreamEncoder.implFlush (StreamEncoder.java:321)
    sun.nio.cs.StreamEncoder.flush (StreamEncoder.java:150)swipe-

2025-11-18T17:49:32.614549Z

> Could you please try this in any other project? I mean running the tests did, same error

oyakushev 2025-11-18T17:50:51.776599Z

What is (my-51-test) exactly?

oyakushev 2025-11-18T17:54:43.608189Z

Let's try another thing, just in case. Downgrade nrepl itself to 1.4.0 by doing M-x customize-variable cider-injected-nrepl-version and set it to 1.4.0 there, click Apply. Then, relaunch the project, verify that it is indeed 1.4.0 on cider-classpath , and then run your tests.

2025-11-18T18:04:49.232819Z

same error

2025-11-18T18:05:20.345669Z

2025-11-18T18:11:01.854029Z

:(

oyakushev 2025-11-18T18:19:15.753809Z

So, this happens on some small unrelated project too? Could you possibly make a reproducer?

2025-11-18T18:24:47.412539Z

ah in smaller project worked

2025-11-18T18:24:55.116109Z

that's strange

2025-11-18T18:24:56.246049Z

damn

oyakushev 2025-11-18T18:26:58.154479Z

What exactly do you do, I still don't quite get. Do you run tests with C-c C-t C-n, or do you call something like clojure.test/run-tests from the REPL?

2025-11-18T18:27:31.035489Z

C-c C-t C-n

2025-11-18T18:27:40.990949Z

or C-c C-t C-t

2025-11-18T18:27:52.545729Z

in REPL in cursive I can run the tests

oyakushev 2025-11-18T18:28:01.000689Z

Alright

oyakushev 2025-11-18T18:28:19.808379Z

Can you double-check in cider-classpath that you really get the cider-nrepl 0.58.0 in the project where it fails?

oyakushev 2025-11-18T18:28:58.035869Z

Actually, this rings a bell. I think we have a submitted issue for this

oyakushev 2025-11-18T18:29:49.263109Z

This https://github.com/clojure-emacs/cider/issues/3667. It looks similar

2025-11-18T18:30:48.305399Z

Yeah looks like

2025-11-18T18:30:55.916529Z

the problem then it seems my logger env too

oyakushev 2025-11-18T18:31:16.102709Z

Yeah, interaction between nested System/out wrappers

2025-11-18T18:31:42.093229Z

I have a configured log with unilog

2025-11-18T18:31:52.499709Z

> Yeah, interaction between nested System/out wrappers makes sense

oyakushev 2025-11-18T18:32:41.549669Z

Try M-x customize-variable cider-redirect-server-output-to-repl and turn it off

oyakushev 2025-11-18T18:32:48.236829Z

Then relaunch the REPL and try the tests

2025-11-18T18:37:01.903309Z

yeah

2025-11-18T18:37:04.034049Z

it workd

2025-11-18T18:37:09.856379Z

this was the problem then

2025-11-18T18:37:10.985009Z

thanks

oyakushev 2025-11-18T18:38:17.038489Z

Yeah, you are welcome. This should be a stable workaround until I finally get to this. If you need the forwarding behavior in other projects, you can only disable it for this project via .dir-locals.el (https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html)

👍 1
2025-11-18T18:38:38.404769Z

yeah makes sense

2025-11-18T18:38:39.849379Z

thanks

2025-11-18T17:15:34.756989Z

what should I do to fix this behavior to have test-runner in cider? Answer: > M-x customize-variable cider-redirect-server-output-to-repl