Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Generated script contains hardcoded classpath #95

Closed
gf3 opened this Issue · 6 comments

3 participants

@gf3

The generated script, swank-clojure, contains a hardcoded path to another user's jar. This is using the standalone installer with 1.3.2.

Screenshot

@zentrope

Same thing here. Produces this error:

Exception in thread "main" java.io.FileNotFoundException: Could not locate swank/swank__init.class or swank/swank.clj on classpath:  (NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eval(Compiler.java:5391)
at clojure.core$eval.invoke(core.clj:2382)
at clojure.main$eval_opt.invoke(main.clj:235)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$script_opt.invoke(main.clj:270)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at clojure.lang.Var.invoke(Var.java:373)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate swank/swank__init.class or swank/swank.clj on classpath: 
at clojure.lang.RT.load(RT.java:412)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn__4519.invoke(core.clj:4915)
at clojure.core$load.doInvoke(core.clj:4914)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:4729)
at clojure.core$load_lib.doInvoke(core.clj:4766)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$load_libs.doInvoke(core.clj:4800)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:544)
at clojure.core$use.doInvoke(core.clj:4892)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at user$eval1.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5424)
... 11 more

Switched in ${HOME} for /home/phil and after realizing a port is a required parameter, things seem to work.

@tavisrudd
Collaborator

I'm not seeing this on 1.4.0-SNAPSHOT with leiningen 1.7.0-SNAPSHOT although the first classpath component in my wrapper script is hard-coded to my own homedir. If that is considered a bug, it's a bug in leiningen rather than swank-clojure as lein handles installation of shell wrappers. @zentrope which version of leiningen did you use?

@zentrope

I'm using clojure 1.3.0, leiningen 1.6.2, and swank-clojure 1.3.4. If there's another plugin I can test-install that uses the same mechanism, let me know and I'll report it here.

@tavisrudd
Collaborator

Ok, I'm also seeing that /home/phil now with either 1.6.2 or 1.7.0-SNAPSHOT if I install swank-clojure 1.3.4 from clojars. However, if I install 1.3.4 from a local checkout I see my own hard-coded /home/tavis.

That line is coming from here https://github.com/technomancy/leiningen/blob/1.x/src/leiningen/jar.clj#L48 I'm not seeing where the first $HOME is being expanded.

@tavisrudd
Collaborator

Fixed on my fork of leiningen 1.x. See technomancy/leiningen#367

@tavisrudd tavisrudd closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.