Reader Conditionals do not behave as expected on the CLR


When using a reader conditional, ClojureCL selects the entry with the clj platform key instead of the clr platform key. The issue is on line 142 of the ListReader.cs file. It looks like the platform key code was copied over from the Clojure project without modifying the value for the CLR.

There is also a small, related issue with the file for version 1.7. The platform keyword is listed as 'cljr' in the file, but the reader documentation on state that the platform key for the CLR is simply 'clr'.


ClojureCLR 1.7 on both Mono on OSX and .NET on Windows 7


David Miller
January 3, 2016, 8:59 PM

Patch applied in commits f3bc3f8, fb7f091 and bf36b98, 2016.01.03.

Ryan Johnson
October 18, 2015, 11:44 PM

I applied the patch, built ClojureCLR, and ran my code on the patched version. After updating my code to use :cljr, the reader conditionals are now working as expected in my code. It looks like the reader conditional documentation on the Clojure site has also been updated with the correct key for the CLR platform. Everything now appears to be correct.

Oscar Morante
October 16, 2015, 1:45 PM

It looks like it should be :cljr after all. Here's an updated patch.

Ryan Johnson
September 22, 2015, 4:17 PM

I've signed the CA. Apologies for not doing so before creating this ticket.

Ryan Johnson
September 9, 2015, 4:39 AM

I've attached two patches. One that fixes the issue in the ListReader.cs and one that updates the reader tests.

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


David Miller


Ryan Johnson