*data-readers* reset on clojure.core require

Description

Requiring clojure.core overwrites the value of data-readers, which suggests that namespace is being reevaluated despite already being implicitly loaded when Clojure boots.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 Nostrand 0.0.1.33362 (master/1b26091* Wed Nov 8 18:32:05 EST 2017) Mono 5.4.0.201 (2017-06/71277e78f6e Thu Sep 21 19:22:55 EDT 2017) Clojure 1.8.0 REPL 0.0.0.0:25542 user> *data-readers* {} user> (alter-var-root #'*data-readers* assoc :foo 99) {:foo 99} user> *data-readers* {:foo 99} user> (require 'clojure.core) nil user> *data-readers* {}

I cannot reproduce this behavior with namespaces I've written, which leads me to believe that this might stem from special treatment of clojure.core. ClojureJVM handles data-readers differently (alter-var-root seems to have no effect) and I was not able to reproduce this defect there.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 nREPL server started on port 53155 on host 127.0.0.1 - nrepl://127.0.0.1:53155 REPL-y 0.3.7, nREPL 0.2.12 Clojure 1.8.0 Java HotSpot(TM) 64-Bit Server VM 1.8.0_60-b27 Docs: (doc function-name-here) (find-doc "part-of-name-here") Source: (source function-name-here) Javadoc: (javadoc java-object-or-class-here) Exit: Control+D or (exit) or (quit) Results: Stored in vars *1, *2, *3, an exception in *e user=> *data-readers* {} user=> (alter-var-root #'*data-readers* assoc :foo 99) {:foo 99} user=> *data-readers* {}

Environment

None

Status

Assignee

David Miller

Reporter

Ramsey Nasser

Labels

Approval

None

Patch

None

Priority

Minor
Configure