Closed seancorfield closed 3 years ago
Is it an issue with the underlying eval runtime, which would mean this is related to issues with output of maps with ordered keys #192?
The result returned by nREPL is #:a{:b 1}
. Proto REPL uses ClojureScript for some of the parsing code that runs in Atom. It seems like ClojureScript isn't parsing that into the same value. If I run (pr-str (cljs.reader/read-string "#:a{:b 1}"))
it returns {:b 1}
.
I think that this is caused by http://dev.clojure.org/jira/browse/CLJS-1706. Until that is fixed it's going to be difficult to fix this completely. That said I have put in a work around so that the original string returned from the REPL will be used for display.
Wow, I'm kinda shocked that ClojureScript is so far behind on the namespaced-maps stuff, given all the work that's been done porting clojure.spec
across!
That update is a slight improvement, but only for inline evaluation:
Inline eval of {:c/d 1}
shows namespace prefix
REPL evaluation of {:a/b 1}
does not
Is that expected with that update? Is there no way to display the actual result from nREPL?
Do you have pretty printing turned on? If you turn it off you'll see the correct value. The auto pretty printing is using ClojureScript and Fipp so it will have the same problem.
Ah yes, that did indeed fix it. What side effects will I get from disabling that?
You won't get automatically pretty printed results at the REPL. This is actually the setting that I use. You can still pretty print the results by sending the pretty print command after executing something. That will pretty print correctly because it uses clojure.pprint/pp through the REPL. See the keybinding documentation for the keystroke.
On Apr 16, 2017, at 1:41 AM, Sean Corfield notifications@github.com wrote:
Ah yes, that did indeed fix it. What side effects will I get from disabling that?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Evaluate the following in ProtoREPL (in any Clojure REPL):
Expected (Clojure 1.9):
Actual (Clojure 1.9):
The namespace qualifier just disappears.