Support reader conditionals


The tools.namespace parser does not recognize reader conditionals.

refresh does not recognize files containing reader conditionals.

Patch calls read with :read-cond :allow. It checks for the presence of clojure.core/reader-conditional? to determine if reader conditionals (and the 2-argument arity of read) is supported.

The patch use the default platform feature, which should always be :clj since tools.namespace only runs under Clojure(JVM).

Sample project from original ticket:




Stuart Sierra
June 19, 2015, 8:44 PM

Included in release 0.2.11

Stuart Sierra
June 19, 2015, 5:25 PM

Patch available to try as 0.2.11-SNAPSHOT or 0.2.11-20150619.155542-23

In Leiningen:

Alex Miller
June 17, 2015, 3:37 AM

Someone else pinged me about this. Likely the read here needs to pass {:read-cond :allow} options to read (only on 1.7 as the options are an arity that was added in 1.7).

May 21, 2015, 5:52 PM

Comment made by: magnars

Can confirm that using Sean's temporary fork seems to solve the issue.

May 13, 2015, 3:38 PM

Comment made by: lorddoig

Maybe the team don't agree but I'm not sure this is a bug - 1.7.0 hasn't landed yet.

In the interim those having problems can use this temporary fork, which is hardcoded to read :clj features.

Your pinned fields
Click on the next to a field label to start pinning.


Stuart Sierra


Former user


Code and Test