Details
-
Type:
Enhancement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: Release 1.5
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Patch:Code
-
Approval:Ok
Description
First discovered by Tim McCormack with Clojure 1.5.0-beta13 and -RC15:
$ java -Dclojure.read.eval=unknown -jar ~/.m2/repository/org/clojure/clojure/1.5.0-RC16/clojure-1.5.0-RC16.jar -e "(+ 1 2)"
Exception in thread "main" java.lang.RuntimeException: Reading disallowed - read-eval bound to :unknown
This would prevent a Leiningen user from putting the following line in their project.clj file in order to look for read or read-string calls that don't explicitly bind read-eval to true or false:
:jvm-opts ["-Dclojure.read.eval=unknown"]
Patch clj-1168-patch-v1.txt dated Feb 19 2013 has been tested manually with these results:
% java -cp clojure.jar clojure.main
(ran some simple tests to ensure repl still works, and obeys -Dclojure.read.eval=unknown setting)
% java -Dclojure.read.eval=unknown -jar clojure.jar -e '(println (+ 1 2))'
3