File tree Expand file tree Collapse file tree
server/src/clojure_cli/repl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ Add these aliases to your user `deps.edn`:
2626
2727The server runs on the project classpath. The client runs in its own JVM with only its own deps.
2828
29- ** Note: Java 17+ is required**
29+ ** Note: Java 17+ and Clojure 1.12+ are required**
3030
3131## Run
3232
Original file line number Diff line number Diff line change 22 (:require
33 [clojure.data.json :as json]
44 [clojure.edn :as edn]
5- [clojure.java.doc.api :as jdoc]
65 [clojure.java.io :as io]
76 [clojure.java.shell :as sh]
87 [clojure.string :as str]
7271 (doc-block (str ns " /" name) arglists doc)))
7372
7473(defn java-doc [sym]
75- (try (with-out-str (jdoc /javadoc-fn (str sym) nil ))
74+ (try (with-out-str (( requiring-resolve 'clojure.java.doc.api /javadoc-fn) (str sym) nil ))
7675 (catch Exception _ nil )))
7776
7877(defn doc-for [token ns-name]
203202 .inheritIO
204203 .start)))
205204
205+ (defn check-clojure-version []
206+ (when (< (:minor *clojure-version*) 12 )
207+ (println " clojure-cli.repl requires Clojure 1.12 or later, started with" (clojure-version ))
208+ (System/exit 1 )))
209+
206210(defn -main [& args]
211+ (check-clojure-version )
207212 (let [srv (start (load-config 'org.clojure/clojure-cli.repl))]
208213 (.addShutdownHook (Runtime/getRuntime )
209214 (Thread. ^Runnable (fn [] (stop srv)))) ; ; on shutdown remove .nrepl-port
You can’t perform that action at this time.
0 commit comments