Note: Similar to issue CLJS-1261.
If you use the source Clojure REPL function on a function defined in a CLJC file, where the function itself contains some conditional code, then the operation will fail with "Conditional read not allowed".
To reproduce:
Do a lein new testme, rename the core.clj file to core.cljc, and then add the following
Additionally, revise the project.clj to specify 1.7.0-beta2.
Require the testme.core namespace, referring :all.
Verify that you can call, get the doc for, and source for f.
But, on the other hand, while you can call and get the doc for g, you can't do (source testme.core/g).
Approach: Set {:read-cond :allow} if source file extension is .cljc. Test above works now.
Patch: clj-1728.patch
1.7.0-beta2
I tested with Alex's cli-1728.patch, and it works for me.
Confirmed fixed using master.
Patch committed and the ticket marked as resolved but not closed. I'm closing it.