technomancy / swank-clojure

Swank/slime support for clojure
Eclipse Public License 1.0
412 stars 83 forks source link

lein-swank, lein2 and clojure-jack-in port as string bug #111

Closed daaku closed 12 years ago

daaku commented 12 years ago

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

(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(#<process swank> "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:

{: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"]]}}
technomancy commented 12 years ago

Not sure how that one snuck by me; thanks for catching it. I've released 1.4.3 with a fix.

daaku commented 12 years ago

Thanks!