Please sign in to comment.
Fix mysterious fatal bug via :aot; Rename to lein-otf (jit is ambiguo…
…us!) Somehow, the released version of lein-jit (which I had been using) completely and utterly failed when I tried to use it again recently. The loader never made it into the jar as either a .clj or .class! Perhaps the problem was specifying a :main that wasn't in the target project's own source tree... but again, it *used to work*. Tried using different versions of Clojure, checkout-dependencies, deps vs. dev-deps... nothing worked. I've fixed this by adding the loader to :aot.
- Loading branch information...
Showing with 27 additions and 18 deletions.
|@@ -1,5 +1,5 @@|
|-(defproject org.timmc/lein-jit "0.0.1"|
|- :url "https://github.com/timmc/lein-jit"|
|+(defproject org.timmc/lein-otf "1.0.0"|
|+ :url "https://github.com/timmc/lein-otf"|
|:description "Leiningen plugin for non-AOT uberjars"|
|:dependencies [[org.clojure/clojure "1.3.0"]]|
|@@ -1,17 +1,19 @@|
|(:use [leiningen.uberjar :only (uberjar)]))|
|"Put in a loader namespace for :main and put the real main namespace in a|
|-manifest field. The lein-jit loader should already be present as a dependency."|
|+manifest field. The lein-otf loader should already be present as a dependency."|
|(if-let [real (:main project)]|
|- (assoc-in ,,, [:main] 'lein-jit.loader)|
|- (assoc-in ,,, [:manifest "lein-jit-real-main"] (str real)))|
|+ (assoc-in ,,, [:main] 'lein-otf.loader)|
|+ (update-in ,,, [:aot]|
|+ (fnil #(conj % 'lein-otf.loader) ))|
|+ (assoc-in ,,, [:manifest "lein-otf-real-main"] (str real)))|
|"Plugin entrance point."|
|[project & args]|
|(apply uberjar (juggle project) args))|