line-seq and read-line don't return nil on Ctrl-D in lein repl
Executing in lein repl either
(doseq [line (line-seq (java.io.BufferedReader. in)) :while line]
(doseq [line (read-line) :while line]
One would expect these to return on a user's enter of Ctrl-D, however they never return.
OSX, lein repl
Geoff, it looks like there have been recent changes committed to the tools.nrepl library related to this issue. tools.nrepl is used within Leiningen to implements its REPL.
Agreed with Andy - these examples work fine in base repl but other environments may be affecting your input upstream of clojure.
If instead of 'lein repl' you run:
at a shell prompt, you get a REPL where the first doseq expression you give does return when you enter Ctrl-D.
The second doseq expression returns a string from (read-line), and then the doseq iterates over that as a sequence of characters, and it returns without needing Ctrl-D after reading a single line in both 'lein repl' and the plain Clojure REPL with the command given above.
I suggest that the behavior with your first doseq expression is an issue to be taken up with the Leiningen developers. Several ways of contacting them are given at http://leiningen.org/#community I would recommend IRC or the email list first, before creating a Github issue.