Closed opqdonut closed 1 month ago
Seems to be an issue with the built-in CLI, as I couldn't reproduce this when using CIDER or lein repl
(which in turn uses REPLy).
I can also reproduce it using Conjure, which uses nrepl: https://github.com/hukka/repl-driven-bug-repro
I'm pretty sure this happens because of this: https://github.com/nrepl/nrepl/blob/master/src/clojure/nrepl/cmdline.clj#L111-L114
The --interactive REPL reads the input form with read
and then prints it back with pr-str
which doesn't print metadata by default. While it is possible to amend this with *print-meta*
flag, I think that ideally the REPL should read the input as a string and pass that further as-is. Smaller chance to run into similar issues in the future.
Good catch!
Expected behavior
Actual behavior
Steps to reproduce the problem
See above.
Environment & Version information
Clojure version
1.10.3
Java version
17
Operating system
Debian Linux