replete-repl / replete-ios

ClojureScript REPL iOS app
Eclipse Public License 1.0
395 stars 25 forks source link

allow conditional read #26

Closed mfikes closed 9 years ago

mfikes commented 9 years ago

#?(:cljs 1 :clj 2)

Conditional read not allowed
cljs$core$ExceptionInfo@file:///cljs/core.js:33157:19
cljs$core$IFn$_invoke$arity$3@file:///cljs/core.js:33219:36
cljs$core$ex_info@file:///cljs/core.js:33205:55
cljs$core$IFn$_invoke$arity$6@file:///cljs/tools/reader.js:1574:29
cljs$tools$reader$read_STAR_@file:///cljs/tools/reader.js:1509:66
cljs$core$IFn$_invoke$arity$2@file:///cljs/tools/reader.js:1633:41
cljs$tools$reader$read@file:///cljs/tools/reader.js:1611:60
cljs$core$IFn$_invoke$arity$2@file:///cljs/tools/reader.js:1679:35
cljs$tools$reader$read_string@file:///cljs/tools/reader.js:1658:67
cljs$core$IFn$_invoke$arity$1@file:///cljs/tools/reader.js:1668:42
cljs$tools$reader$read_string@file:///cljs/tools/reader.js:1654:67
replete$core$read_eval_print@file:///replete/core.js:40:46
mfikes commented 9 years ago

See :read-cond and how it is used in Himera https://github.com/fogus/himera/blob/master/src/clj/himera/server/service.clj

(Similar thing is done in Cljs REPL.)

mfikes commented 9 years ago

Also see https://github.com/fogus/himera/pull/33 regarding properly disabling read-eval (I can't recall if this is disabled in regular Cljs repls)