boot-clj / boot-new

Generate new projects based on Boot Templates and/or Leiningen Templates!
https://clojars.org/boot/new
Eclipse Public License 1.0
155 stars 42 forks source link

luminus templates #18

Closed mbuczko closed 8 years ago

mbuczko commented 8 years ago

hi, I'm not sure I'm using your boot-new right, but I tried to generate luminus simplest template as following:

boot -d seancorfield/boot-new new -t luminus -n myapp

and got this:

java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Cannot open <nil> as a Reader.
 java.lang.IllegalArgumentException: Cannot open <nil> as a Reader.
               clojure.java.io/fn/invokeStatic           io.clj:  288
                            clojure.java.io/fn           io.clj:  288
                          clojure.java.io/fn/G           io.clj:   69
           clojure.java.io/reader/invokeStatic           io.clj:  102
                        clojure.java.io/reader           io.clj:   86
                                           ...
leiningen.core.main/leiningen-version/invokeStatic         main.clj:  321
         leiningen.core.main/leiningen-version         main.clj:  319
leiningen.new.luminus/version-before?/invokeStatic      luminus.clj:  119
         leiningen.new.luminus/version-before?      luminus.clj:  118
    leiningen.new.luminus/luminus/invokeStatic      luminus.clj:  152
                 leiningen.new.luminus/luminus      luminus.clj:  126
                                           ...
               clojure.core/apply/invokeStatic         core.clj:  648
                            clojure.core/apply         core.clj:  641
         boot.new-helpers/create*/invokeStatic  new_helpers.clj:  105
                      boot.new-helpers/create*  new_helpers.clj:   78
          boot.new-helpers/create/invokeStatic  new_helpers.clj:  118
                       boot.new-helpers/create  new_helpers.clj:  107
                                           ...
                      boot.new/eval71/fn/fn/fn          new.clj:   43
                           boot.core/run-tasks         core.clj:  794
                             boot.core/boot/fn         core.clj:  804
           clojure.core/binding-conveyor-fn/fn         core.clj: 1938

so I guess I'm either doing something wrong or luminus template is exceptional :)

seancorfield commented 8 years ago

Unfortunately the Luminus template does a lot of things that reach deeply into the internals of Leiningen so boot-new just isn't going to be able to impersonate Leiningen well enough for that to ever work.

seancorfield commented 8 years ago

Release 0.4.3 adds a hack to support calls to leiningen.core.main/leiningen-version so you can now generate Luminus templates!

mbuczko commented 8 years ago

works great now, thanks for all the work!

paulrd commented 8 years ago

Did this break? The command works, but creates a leiningen project. I don't see a build.boot file. Was this not this the intention of using lein templates with boot?

seancorfield commented 8 years ago

boot-new runs both Leiningen and Boot templates. The templates produce whatever they want. The Luminus template - written for lein new - produces a Leiningen project. This ticket is for boot-new to be able to run that template, despite the dependencies it had on some Leiningen internals. boot-new doesn't change what a template does.