Clojure

read+string does not support reader conditionals

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.10
  • Fix Version/s: None
  • Component/s: None
  • Approval:
    Triaged

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)

Activity

Hide
Nicola Mometto added a comment -

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

Show
Nicola Mometto added a comment - 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

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: