nrepl

danielsz 2026-03-09T02:37:32.590919Z

nrepl v1.6.0 warns about missing piggieback middleware even in pure clojure projects (when piggieback is not needed). This didn't happen in previous versions. https://github.com/nrepl/nrepl/issues/424

danielsz 2026-04-07T05:07:58.238109Z

What problem did you have with the port setting?

bozhidar 2026-03-11T05:38:27.698629Z

Btw, do you happen to have piggieback on your classpath for some reason in those pure Clojure projects? After looking a bit at the code this seems to be the reason you’re getting such warnings after the recent nREPL changes and that’s actually the expected behavior.

bozhidar 2026-03-19T08:21:03.891759Z

That's explained in the issue that I linked and there we are also discussing with @alexyakushev what's the best course of action for this.

🙏 1
danielsz 2026-03-16T16:36:22.199819Z

@bozhidar Yes, you are correct, piggieback is being pulled on my classpath even in a pure Clojure project, which is unexpected and I am investigating why.

danielsz 2026-03-19T06:54:27.885489Z

@bozhidar Doesn't that raise another question, though: if piggieback is on the classpath, what is this warning warning against?

oyakushev 2026-04-01T13:49:27.914429Z

It might be the problem with clojure-maven-plugin. The warning did repeat for me in your repro example. Could be the case with misconfiguration. For example, I can't make the port setting to work either.

danielsz 2026-03-23T13:27:23.464469Z

@alexyakushev @bozhidar Of course, here it is: https://github.com/danielsz/piggieback-warnings Please do not hesitate to get back to me if you have trouble with anything.

oyakushev 2026-03-21T11:51:55.947979Z

The warning is against having piggieback on classpath but not explicitly including its middleware in the nrepl server being started. It used to be included automatically by cider-nrepl, but it is no longer the case.

oyakushev 2026-03-21T11:52:58.592679Z

Therefore, I think the current behavior is reasonable. Removing piggieback from classpath should get rid of the warnings, which is a viable solution.

danielsz 2026-03-21T16:13:14.964659Z

I agree with the principle of piggieback not in classpath -> no warnings vs in classpath but no middleware added in middleware vector -> warnings. Unfortunately, this does not describe the behavior with https://mvnrepository.com/artifact/com.theoryinpractise/clojure-maven-plugin where the warnings appear consistently despite piggieback being in the classpath and its middleware being present in the middleware vector.

oyakushev 2026-03-21T16:43:53.573329Z

That shouldn't happen. I would appreciate a small reproducer

bozhidar 2026-03-09T19:50:05.679019Z

I'll take a look, although at a glance it seems to me that's the expected behavior right now. (at least as far as nREPL is concerned) The warnings are actually caused by the way cider-nrepl use piggieback internally, and probably the real fix will happen there.

🙏 1
bozhidar 2026-03-11T18:12:40.014969Z

See also https://github.com/clojure-emacs/cider-nrepl/pull/971

eraserhd 2026-03-09T18:50:44.399099Z

Just musing with an idea, but has anyone used nREPL over serial port? The key difference being that there's a single stream no matter how many clients connect, and the session needs to be reset somehow on the server end.

Ivar Refsdal 2026-03-10T07:49:48.489659Z

I have not. Maybe running ssh over the serial port with port forwarding might be easier? Would that be possible?

eraserhd 2026-03-10T13:23:39.031609Z

Porting SSH and an IP stack to these microcontrollers seems like a lot.

eraserhd 2026-03-10T13:24:25.172499Z

I guess the IP stack isn't necessary, since you said over serial...

eraserhd 2026-03-09T18:51:47.086819Z

In my case, this is for microcontrollers, such as the Pi Pico or Arduino.

2026-03-09T19:21:02.650399Z

The protocol already supports this, the session id is part of the message. The degree to which clients support this and middleware respects it, I dunno