[FIX #206] Dynamically require commiteth.core in user namespace

This commit is contained in:
Vitaliy Vlasov 2018-01-09 14:11:35 +02:00
parent c58f814713
commit 3c77dd297e
2 changed files with 6 additions and 9 deletions

View File

@ -1,13 +1,14 @@
(ns user (ns user
(:require [mount.core :as mount] (:require [mount.core :as mount]
[commiteth.figwheel :refer [start-fw stop-fw cljs]] [commiteth.figwheel :refer [start-fw stop-fw cljs]]))
commiteth.core))
(defn start [] (defn start []
(mount/start-without #'commiteth.core/repl-server)) (require 'commiteth.core)
(mount/start-without (ns-resolve 'commiteth.core 'repl-server)))
(defn stop [] (defn stop []
(mount/stop-except #'commiteth.core/repl-server)) (require 'commiteth.core)
(mount/stop-except (ns-resolve 'commiteth.core 'repl-server)))
(defn restart [] (defn restart []
(stop) (stop)

View File

@ -116,10 +116,6 @@
:uberjar-name "commiteth.jar" :uberjar-name "commiteth.jar"
:source-paths ["env/prod/clj"] :source-paths ["env/prod/clj"]
:resource-paths ["env/prod/resources"]} :resource-paths ["env/prod/resources"]}
;; :precomp profile allows to compile classes from commiteth.eth.contracts
;; namespace before compiling clojure code. Otherwise ClassNotFound exception
;; will be thrown
:precomp {:target-path "target/base+system+user+dev/" }
:dev {:dependencies [[prone "1.1.4"] :dev {:dependencies [[prone "1.1.4"]
[ring/ring-mock "0.3.1"] [ring/ring-mock "0.3.1"]
[ring/ring-devel "1.6.2"] [ring/ring-devel "1.6.2"]
@ -146,7 +142,7 @@
:optimizations :none :optimizations :none
:pretty-print true}}]} :pretty-print true}}]}
:prep-tasks ["build-contracts" ["with-profile" "precomp" "javac"]] :prep-tasks ["build-contracts" "javac"]
:doo {:build "test"} :doo {:build "test"}
:source-paths ["env/dev/clj" "test/clj"] :source-paths ["env/dev/clj" "test/clj"]
:resource-paths ["env/dev/resources"] :resource-paths ["env/dev/resources"]