Reader Conditionals do not behave as expected on the CLR

Description

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 changes.md file for version 1.7. The platform keyword is listed as 'cljr' in the changes.md file, but the reader documentation on clojure.org state that the platform key for the CLR is simply 'clr'.

Environment

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

Activity

Show:
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.

Ryan Johnson
September 22, 2015, 4:17 PM

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

Oscar Morante
October 16, 2015, 1:45 PM

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

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.

David Miller
January 3, 2016, 8:59 PM

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

Completed

Assignee

David Miller

Reporter

Ryan Johnson

Labels

Approval

None

Patch

None

Priority

Major