clojure.repl/source fails when *read-eval* bound to :unknown

Description

clojure.repl/source is broken in Clojure 1.5.1 when *read-eval* is bound to :unknown, since source-fn reads without binding.

Approach: Throw explicit error stating the cause in this case.

Patch: clj-1176-source-read-eval-3.patch

Screened by: Stuart Sierra

Environment

None

Attachments

3

Activity

Show:

Stuart Sierra January 17, 2014 at 3:44 PM

Screened ✔

Alex Miller January 14, 2014 at 3:01 PM

Stuart - totally good catch. Things did not work how I thought they worked! I have updated the patch.

Stuart Sierra January 10, 2014 at 10:44 PM

Changed my mind: resetting to 'incomplete'.

This patch doesn't fix the situation in the original report. To improve the error message, it should handle the :unknown case.

If read-eval is false, then source still works as long as the source form doesn't contain #=

Stuart Sierra January 10, 2014 at 10:37 PM

Screened OK.

Note that this only changes the error message when read-eval is bound to false, not when it is bound to :unknown.

Alex Miller December 30, 2013 at 4:47 AM

Updated with new patch that detects and throws an error if calling source with read-eval is false.

Completed

Details

Assignee

Reporter

Labels

Approval

Ok

Patch

Code and Test

Priority

Affects versions

Fix versions

Created March 6, 2013 at 9:26 PM
Updated January 31, 2014 at 6:19 PM
Resolved January 31, 2014 at 6:19 PM