read+string does not support reader conditionals

Description

Because read+string calls downwards with (apply read rdr args) it does not support reader conditionals. Those have to be flagged in through the opts parameter to #'read, which is only available with the oddly backwards signature (read opts rdr)

Proposed: Need to handle the different arities of read+string appropriately so that all of them forward correctly to read (in particular the [opts stream] one).

Patch: clj-2358.patch

Environment

None

Activity

Show:
Nicola Mometto
June 15, 2018, 4:21 PM

Here's the implementation of tools.reader, which doesn't contain this bug: https://github.com/clojure/tools.reader/blob/master/src/main/clojure/clojure/tools/reader.clj#L1013-L1015
Something similar could be done here, or read+string could be manually unrolled

Ghadi Shayban
July 5, 2018, 6:20 PM

read+string doesn't reach the underlying (read opts stream) signature at all, so whatever missing opts are not limited to reader conditionals

Completed

Assignee

Unassigned

Reporter

Ghadi Shayban

Approval

Ok

Patch

Code and Test

Affects versions

Priority

Minor
Configure