Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException when running ‘lein trampoline repl’ #2572

Closed
glts opened this issue May 12, 2019 · 4 comments
Closed

ClassCastException when running ‘lein trampoline repl’ #2572

glts opened this issue May 12, 2019 · 4 comments

Comments

@glts
Copy link
Collaborator

glts commented May 12, 2019

Trying to reproduce #2038 … looks like the nREPL upgrade broke ‘lein trampoline repl’? This used to work in Leiningen 2.8.1.

$ lein trampoline repl
ClassCastException java.lang.String cannot be cast to java.lang.Number
        nrepl.server/start-server/addr--1163 (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--2329 (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)
Bye for now!

This is with Leiningen 2.9.1.

@glts
Copy link
Collaborator Author

glts commented May 16, 2019

This is being talked about in trptcolin/reply#186.

glts referenced this issue in trptcolin/reply May 19, 2019
* server is no longer something you can deref (it's a regular record)
* passing a nil port is the same as passing 0
@bbatsov
Copy link
Contributor

bbatsov commented May 19, 2019

What exactly is causing Lein to pass the port number as a string? I think it passes the port number as a number pretty much everywhere. Fixing this should be trivial - we just have to identify the offending call in Lein.

@glts
Copy link
Collaborator Author

glts commented May 19, 2019

It is a regression within REPL-y, clojure -Sdeps '{:deps {reply {:mvn/version "0.4.3"}}}' -m reply.main --port 3333 triggers the exception. REPL-y no longer parses the port string.

@bbatsov
Copy link
Contributor

bbatsov commented May 19, 2019

I get why this is broken, but I still don't get how come it affects Lein and you patched REPLy before I could check the code there. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants