better nrepl.
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
[com.badlogicgames.gdx/gdx-backend-lwjgl "1.5.3"]
|
[com.badlogicgames.gdx/gdx-backend-lwjgl "1.5.3"]
|
||||||
[com.badlogicgames.gdx/gdx-platform "1.5.3" :classifier "natives-desktop"]
|
[com.badlogicgames.gdx/gdx-platform "1.5.3" :classifier "natives-desktop"]
|
||||||
[org.clojure/clojure "1.6.0"]
|
[org.clojure/clojure "1.6.0"]
|
||||||
[org.clojure/tools.nrepl "0.2.7"]
|
|
||||||
[play-clj "0.4.5-BRYCE"]
|
[play-clj "0.4.5-BRYCE"]
|
||||||
[org.clojure/data.priority-map "0.0.5"]
|
[org.clojure/data.priority-map "0.0.5"]
|
||||||
[org.clojure/core.async "0.1.338.0-5c5012-alpha"]]
|
[org.clojure/core.async "0.1.338.0-5c5012-alpha"]]
|
||||||
@@ -21,7 +21,9 @@
|
|||||||
:profiles {
|
:profiles {
|
||||||
:dev {
|
:dev {
|
||||||
:source-paths ["src" "src-common" "src-dev"]
|
:source-paths ["src" "src-common" "src-dev"]
|
||||||
|
:jvm-opts ["-Duse-repl=true"]
|
||||||
:dependencies [[com.badlogicgames.gdx/gdx-tools "1.5.3"]
|
:dependencies [[com.badlogicgames.gdx/gdx-tools "1.5.3"]
|
||||||
|
[org.clojure/tools.nrepl "0.2.7"]
|
||||||
[slamhound "1.5.5"]
|
[slamhound "1.5.5"]
|
||||||
[org.clojure/data.csv "0.1.3"]]
|
[org.clojure/data.csv "0.1.3"]]
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
(ns advent.core.desktop-launcher
|
(ns advent.core.desktop-launcher
|
||||||
(:require [advent.core :refer :all]
|
(:require [advent.core :refer :all]
|
||||||
[advent.utils :as utils]
|
[advent.utils :as utils]
|
||||||
#_[clojure.tools.nrepl.server])
|
)
|
||||||
(:import [com.badlogic.gdx.backends.lwjgl LwjglApplication LwjglApplicationConfiguration]
|
(:import [com.badlogic.gdx.backends.lwjgl LwjglApplication LwjglApplicationConfiguration]
|
||||||
[org.lwjgl.input Keyboard]
|
[org.lwjgl.input Keyboard]
|
||||||
[com.badlogic.gdx Gdx])
|
[com.badlogic.gdx Gdx])
|
||||||
@@ -9,18 +9,22 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defn -main
|
(defn -main
|
||||||
[& [port]]
|
[& [port]]
|
||||||
#_(try
|
(when (System/getProperty "use-repl")
|
||||||
|
(eval `(require 'clojure.tools.nrepl.server))
|
||||||
(when port (let [{port :port} (clojure.tools.nrepl.server/start-server :port (Integer/parseInt port))]
|
(eval `(try
|
||||||
(doseq [port-file ["target/repl-port" ".nrepl-port"]]
|
|
||||||
(-> port-file
|
(when ~port (let [{port# :port} (clojure.tools.nrepl.server/start-server :port (Integer/parseInt ~port))]
|
||||||
java.io.File.
|
(doseq [port-file# ["target/repl-port" ".nrepl-port"]]
|
||||||
(doto .deleteOnExit)
|
(-> port-file#
|
||||||
(spit port)))
|
java.io.File.
|
||||||
(println "Started nREPL server on port" port)))
|
(doto .deleteOnExit)
|
||||||
(catch Exception e))
|
(spit port#)))
|
||||||
|
(println "Started nREPL server on port" port#)))
|
||||||
|
(catch Exception e#))))
|
||||||
|
|
||||||
(let [cfg (LwjglApplicationConfiguration.)]
|
(let [cfg (LwjglApplicationConfiguration.)]
|
||||||
(if false
|
(if false
|
||||||
|
|||||||
Reference in New Issue
Block a user