Details
Assignee
UnassignedUnassignedReporter
Alex MillerAlex MillerApproval
TriagedPriority
MajorAffects versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Alex Miller
Alex MillerApproval
Triaged
Priority

Affects versions
Created January 27, 2022 at 10:33 PM
Updated January 27, 2022 at 10:34 PM
Per https://ask.clojure.org/index.php/11518/clojure-core-server-io-prepl-doesnt-support-read-line
Repro:
λ clj -Srepro -M -r Clojure 1.10.3 user=> (read-line) Hello, world! "Hello, world!" user=> (clojure.core.server/io-prepl) (read-line) {:tag :ret, :val "\"\"", :ns "user", :ms 2, :form "(read-line)"}
Notice how with io-prepl, (read-line) returns immediately without awaiting for user input and returns an empty string.
Calling either clojure.main/skip-if-eol or clojure.main/skip-whitespace after read+string in clojure.core.server/prepl appears to fix the issue, but it is admittedly unclear to me why that is.