trptcolin / reply

REPL-y: A fitter, happier, more productive REPL for Clojure.
Eclipse Public License 1.0
337 stars 44 forks source link

--port 12345 causes ClassCastException in nrepl.server/start-server #199

Closed hoxu closed 4 years ago

hoxu commented 4 years ago
$ ... -m reply.main --port 12345
ClassCastException class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap')
        nrepl.server/start-server/addr--53094 (server.clj:120)
        nrepl.server/start-server (server.clj:128)
        nrepl.server/start-server (server.clj:96)
        reply.eval-modes.nrepl/get-connection (nrepl.clj:158)
        reply.eval-modes.nrepl/get-connection (nrepl.clj:156)
        reply.eval-modes.nrepl/main (nrepl.clj:202)
        reply.eval-modes.nrepl/main (nrepl.clj:200)
        reply.main/launch-nrepl/fn--54332 (main.clj:79)
        clojure.core/with-redefs-fn (core.clj:7514)
        clojure.core/with-redefs-fn (core.clj:7498)
        reply.main/launch-nrepl (main.clj:78)
        reply.main/launch-nrepl (main.clj:72)
bbatsov commented 4 years ago

Seems we're missing a string conversion somewhere. That should be pretty easy to fix.

trptcolin commented 4 years ago

This might just be a README bug - I see the README is specifying an old version for the clojure -Sdeps invocation (https://github.com/trptcolin/reply/blob/bb6bdf468526191819ca9766a10968edb8d37430/README.md#clojure-cli-toolsdeps). I can reproduce w/ that old version (0.4.3), but not with 0.4.4. I think this was fixed by #198

@hoxu can you confirm whether that's the case for you?

Assuming that's right, I think we should probably just be more generic in the clj-deps advice, and remove the version number.

bbatsov commented 4 years ago

@trptcolin Great catch! I had forgotten my own fix! :D

hoxu commented 4 years ago

I can confirm --port 12345 works with 0.4.4.

The README should probably be fixed!