technomancy/swank-clojure — Issue #111: lein-swank, lein2 and clojure-jack-in port as string bug
Author: nshah
Created: 2012-03-03 09:48:07+00:00
State: open

I was trying out lein2 (set as lein in my environment) and ran into this which looks like a bug:

```clojure
(sleep-for 0.1)
(run-hooks 'slime-load-hook) ; on port 64768
;;; Done bootstrapping.
Listening for transport dt_socket at address: 52220
Exception in thread \"main\" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
at swank.util.net.sockets$make_server_socket.invoke(sockets.clj:22)
at swank.core.server$setup_server.invoke(server.clj:104)
at swank.swank$start_server.doInvoke(swank.clj:59)
at clojure.lang.RestFn.invoke(RestFn.java:1096)
at user$eval1929.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6465)
at clojure.lang.Compiler.eval(Compiler.java:6455)
at clojure.lang.Compiler.eval(Compiler.java:6455)
at clojure.lang.Compiler.eval(Compiler.java:6431)
at clojure.core$eval.invoke(core.clj:2795)
at clojure.main$eval_opt.invoke(main.clj:296)
at clojure.main$initialize.invoke(main.clj:315)
at clojure.main$null_opt.invoke(main.clj:348)
at clojure.main$main.doInvoke(main.clj:426)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:405)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.main.main(main.java:37)
")
signal(error ("Could not start swank server: ;;; Bootstrapping bundled version of SLIME; please wait...\n\n\n(when (not (featurep 'slime-fbbb883a))\n (i$
error("Could not start swank server: %s" ";;; Bootstrapping bundled version of SLIME; please wait...\n\n\n(when (not (featurep 'slime-fbbb883a))\n (if ($
clojure-jack-in-sentinel(# "exited abnormally with code 1\n")
```

I'm using slime and clojure-mode from master (installed using el-get) and have this in ~/.lein/profiles.clj:

```clojure
{:user {:plugins [[lein-gentags "0.0.2-SNAPSHOT"]
[lein-marginalia "0.7.0-20111019.122151-1"]
[lein-pprint "1.1.1"]
[lein-swank "1.4.2"]
[org.clojure/tools.logging "0.2.3"]]}}
```