data_readers hard coded to .clj extension, should be extended to .cljc

Description

Currently using data_readers in ClojureScript is difficult because the extensions are not available to both compile time and runtime as they are in Clojure. This is fairly straightforward to remedy now given the presence of conditional reading - simply supply data_readers.cljc.

Approach: Find and read both data_readers.clj and data_readers.cljc. For cljc, allow reader conditionals.

Alternative: Another option would be to just allow reader conditionals on the existing data_readers.clj file. That's a simpler patch but possibly confusing given that conditionals are only available in .cljc files right now.

Patch: clj-1699.patch - tested with a variety of manual tests

Environment

None

Attachments

1
  • 13 Apr 2015, 07:51 PM

Activity

Show:

David Nolen April 10, 2015 at 10:23 PM

This could be solved trivially by concatenated data_readers.cljc resources to the return value of clojure.core/data-reader-urls.

Completed

Details

Assignee

Reporter

Labels

Approval

Ok

Patch

Code

Priority

Affects versions

Fix versions

Created April 10, 2015 at 10:22 PM
Updated April 24, 2015 at 4:14 PM
Resolved April 24, 2015 at 4:14 PM