weavejester / lein-ring

Ring plugin for Leiningen
Eclipse Public License 1.0
501 stars 100 forks source link

Lein ring uberjar command throws a RuntimeException in v0.9.5 #165

Closed ducky427 closed 9 years ago

ducky427 commented 9 years ago

Using the uberjar command in this plugin v0.9.5 throws the following error:

I used the compojure-template to generate the test project.

java.lang.RuntimeException: Unreadable form, compiling:(test_ring/handler/main.clj:1:7643)
    at clojure.lang.Compiler.compile(Compiler.java:7386)
    at clojure.lang.RT.compile(RT.java:398)
    at clojure.lang.RT.load(RT.java:438)
    at clojure.lang.RT.load(RT.java:411)
    at clojure.core$load$fn__5066.invoke(core.clj:5641)
    at clojure.core$load.doInvoke(core.clj:5640)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5446)
    at clojure.core$compile$fn__5071.invoke(core.clj:5652)
    at clojure.core$compile.invoke(core.clj:5651)
    at user$eval9$fn__16.invoke(form-init781471359515051966.clj:1)
    at user$eval9.invoke(form-init781471359515051966.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6703)
    at clojure.lang.Compiler.eval(Compiler.java:6693)
    at clojure.lang.Compiler.load(Compiler.java:7130)
    at clojure.lang.Compiler.loadFile(Compiler.java:7086)
    at clojure.main$load_script.invoke(main.clj:274)
    at clojure.main$init_opt.invoke(main.clj:279)
    at clojure.main$initialize.invoke(main.clj:307)
    at clojure.main$null_opt.invoke(main.clj:342)
    at clojure.main$main.doInvoke(main.clj:420)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:383)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.Var.applyTo(Var.java:700)
    at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unreadable form
    at clojure.lang.Util.runtimeException(Util.java:221)
    at clojure.lang.LispReader$UnreadableReader.invoke(LispReader.java:1106)
    at clojure.lang.LispReader$DispatchReader.invoke(LispReader.java:616)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:716)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$VectorReader.invoke(LispReader.java:1073)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:724)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:716)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:716)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:716)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:716)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$ListReader.invoke(LispReader.java:972)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$ListReader.invoke(LispReader.java:972)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$ListReader.invoke(LispReader.java:972)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$ListReader.invoke(LispReader.java:972)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.Compiler.compile(Compiler.java:7287)
    ... 25 more
Exception in thread "main" java.lang.RuntimeException: Unreadable form, compiling:(test_ring/handler/main.clj:1:7643)
    at clojure.lang.Compiler.compile(Compiler.java:7386)
    at clojure.lang.RT.compile(RT.java:398)
    at clojure.lang.RT.load(RT.java:438)
    at clojure.lang.RT.load(RT.java:411)
    at clojure.core$load$fn__5066.invoke(core.clj:5641)
    at clojure.core$load.doInvoke(core.clj:5640)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5446)
    at clojure.core$compile$fn__5071.invoke(core.clj:5652)
    at clojure.core$compile.invoke(core.clj:5651)
    at user$eval9$fn__16.invoke(form-init781471359515051966.clj:1)
    at user$eval9.invoke(form-init781471359515051966.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6703)
    at clojure.lang.Compiler.eval(Compiler.java:6693)
    at clojure.lang.Compiler.load(Compiler.java:7130)
    at clojure.lang.Compiler.loadFile(Compiler.java:7086)
    at clojure.main$load_script.invoke(main.clj:274)
    at clojure.main$init_opt.invoke(main.clj:279)
    at clojure.main$initialize.invoke(main.clj:307)
    at clojure.main$null_opt.invoke(main.clj:342)
    at clojure.main$main.doInvoke(main.clj:420)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:383)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.Var.applyTo(Var.java:700)
    at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unreadable form
    at clojure.lang.Util.runtimeException(Util.java:221)
    at clojure.lang.LispReader$UnreadableReader.invoke(LispReader.java:1106)
    at clojure.lang.LispReader$DispatchReader.invoke(LispReader.java:616)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:716)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$VectorReader.invoke(LispReader.java:1073)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:724)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:716)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:716)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:716)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1081)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:716)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$ListReader.invoke(LispReader.java:972)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$ListReader.invoke(LispReader.java:972)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$ListReader.invoke(LispReader.java:972)
    at clojure.lang.LispReader.readDelimitedList(LispReader.java:1138)
    at clojure.lang.LispReader$ListReader.invoke(LispReader.java:972)
    at clojure.lang.LispReader.read(LispReader.java:183)
    at clojure.lang.Compiler.compile(Compiler.java:7287)
    ... 25 more
Compilation failed: Subprocess failed

The plugin v0.9.4 works as expected.

ducky427 commented 9 years ago

I've narrowed the problem down to this commit.

ducky427 commented 9 years ago

Without this change, the main.clj file being generated is 320 bytes and with this change, the same file is 41K. I am guessing that print-meta is causing too much stuff to be put in main.clj some of which isn't correct clojure code.

MichaelBlume commented 9 years ago

Yep, sorry about that, thanks for the report. Fix shortly.

ducky427 commented 9 years ago

Thanks!