Fix #1456 (2): add *data-readers*
This commit is contained in:
parent
b9308eddcc
commit
a0a34dc5d8
3 changed files with 13 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
(ns babashka.impl.nrepl-server
|
(ns babashka.impl.nrepl-server
|
||||||
{:no-doc true}
|
{:no-doc true}
|
||||||
(:require
|
(:require
|
||||||
[babashka.impl.clojure.core]
|
[babashka.impl.clojure.core :as core-extras]
|
||||||
[babashka.impl.common :as common]
|
[babashka.impl.common :as common]
|
||||||
[babashka.nrepl.server :as server]
|
[babashka.nrepl.server :as server]
|
||||||
[sci.core :as sci]))
|
[sci.core :as sci]))
|
||||||
|
|
@ -13,8 +13,11 @@
|
||||||
(let [dev? (= "true" (System/getenv "BABASHKA_DEV"))
|
(let [dev? (= "true" (System/getenv "BABASHKA_DEV"))
|
||||||
opts (merge {:debug dev?
|
opts (merge {:debug dev?
|
||||||
:describe {"versions" {"babashka" common/version}}
|
:describe {"versions" {"babashka" common/version}}
|
||||||
:thread-bind [babashka.impl.clojure.core/warn-on-reflection
|
:thread-bind [core-extras/warn-on-reflection
|
||||||
babashka.impl.clojure.core/unchecked-math]}
|
core-extras/unchecked-math
|
||||||
|
core-extras/data-readers
|
||||||
|
sci/ns
|
||||||
|
sci/print-length]}
|
||||||
opts)]
|
opts)]
|
||||||
(server/start-server! (common/ctx) opts))))
|
(server/start-server! (common/ctx) opts))))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,10 @@
|
||||||
([sci-ctx {:keys [:init :read :eval :need-prompt :prompt :flush :print :caught]}]
|
([sci-ctx {:keys [:init :read :eval :need-prompt :prompt :flush :print :caught]}]
|
||||||
(let [in @sci/in]
|
(let [in @sci/in]
|
||||||
(sci/binding [core-extras/warn-on-reflection @core-extras/warn-on-reflection
|
(sci/binding [core-extras/warn-on-reflection @core-extras/warn-on-reflection
|
||||||
core-extras/unchecked-math @core-extras/unchecked-math]
|
core-extras/unchecked-math @core-extras/unchecked-math
|
||||||
|
core-extras/data-readers @core-extras/data-readers
|
||||||
|
sci/ns @sci/ns
|
||||||
|
sci/print-length @sci/print-length]
|
||||||
(m/repl
|
(m/repl
|
||||||
:init (or init
|
:init (or init
|
||||||
(fn []
|
(fn []
|
||||||
|
|
|
||||||
|
|
@ -775,7 +775,9 @@ Use bb run --help to show this help output.
|
||||||
core/unchecked-math @core/unchecked-math
|
core/unchecked-math @core/unchecked-math
|
||||||
core/data-readers @core/data-readers
|
core/data-readers @core/data-readers
|
||||||
sci/ns @sci/ns
|
sci/ns @sci/ns
|
||||||
sci/print-length @sci/print-length]
|
sci/print-length @sci/print-length
|
||||||
|
;; when adding vars here, also add them to repl.clj and nrepl_server.clj
|
||||||
|
]
|
||||||
(let [{version-opt :version
|
(let [{version-opt :version
|
||||||
:keys [:shell-in :edn-in :shell-out :edn-out
|
:keys [:shell-in :edn-in :shell-out :edn-out
|
||||||
:help :file :command-line-args
|
:help :file :command-line-args
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue