Merge pull request #2155 from 3duard0/fix-issue-2082
Fix for issue #2082
This commit is contained in:
commit
49abe11085
2 changed files with 9 additions and 5 deletions
|
@ -30,6 +30,8 @@
|
|||
leiningen.core.utils/platform-nullsink instead."
|
||||
utils/platform-nullsink)
|
||||
|
||||
(def ^:dynamic *eval-print-dup* false)
|
||||
|
||||
;; # Preparing for eval-in-project
|
||||
|
||||
(defn- write-pom-properties [{:keys [compile-path group name] :as project}]
|
||||
|
@ -236,9 +238,10 @@
|
|||
(io/file (:target-path project) (str checksum "-init.clj"))
|
||||
(File/createTempFile "form-init" ".clj"))]
|
||||
(spit init-file
|
||||
(pr-str (if-not (System/getenv "LEIN_FAST_TRAMPOLINE")
|
||||
`(.deleteOnExit (File. ~(.getCanonicalPath init-file))))
|
||||
form))
|
||||
(binding [*print-dup* *eval-print-dup*]
|
||||
(pr-str (if-not (System/getenv "LEIN_FAST_TRAMPOLINE")
|
||||
`(.deleteOnExit (File. ~(.getCanonicalPath init-file))))
|
||||
form)))
|
||||
`(~(or (:java-cmd project) (System/getenv "JAVA_CMD") "java")
|
||||
~@(classpath-arg project)
|
||||
~@(get-jvm-args project)
|
||||
|
@ -315,7 +318,8 @@
|
|||
:port (Integer. (slurp port-file)))
|
||||
client (client-session (client transport Long/MAX_VALUE))
|
||||
pending (atom #{})]
|
||||
(message client {:op "eval" :code (pr-str form)})
|
||||
(message client {:op "eval" :code (binding [*print-dup* *eval-print-dup*]
|
||||
(pr-str form))})
|
||||
(doseq [{:keys [out err status session] :as msg} (repeatedly
|
||||
#(recv transport 100))
|
||||
:while (not (done? msg pending))]
|
||||
|
|
|
@ -162,7 +162,7 @@ Code that should run on startup belongs in a -main defn."
|
|||
(throw t#)))))
|
||||
project (update-in project [:prep-tasks]
|
||||
(partial remove #{"compile"}))]
|
||||
(try (binding [*print-dup* true]
|
||||
(try (binding [eval/*eval-print-dup* true]
|
||||
(eval/eval-in-project project form))
|
||||
(catch Exception e
|
||||
(main/abort "Compilation failed:" (.getMessage e)))
|
||||
|
|
Loading…
Reference in a new issue