<< Back to previous view

[TCHECK-113] `lein test` crashes when clojure.test.check.clojure-test is required at runtime Created: 20/Jul/16  Updated: 20/Jul/16  Resolved: 20/Jul/16

Status: Closed
Project: test.check
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Gary Fredericks Assignee: Gary Fredericks
Resolution: Completed Votes: 0
Labels: None


This isn't test.check's fault, but it may become common enough that it warrants accounting for somehow.

lein test monkeypatches clojure.test/report, which causes it to no longer be a multimethod.

clojure.test.check.clojure-test extends the multimethod when the namespace is loaded.

It appears the monkeypatching doesn't happen until after all namespaces are required, so this is not normally an issue.

However, clojure.spec loads some of test.check at runtime.

Although it may be that this is only a problem on versions <= 0.9.0, when clojure.test.check require clojure.test.check.clojure-test; now that that dependency has been reversed, this may not happen in practice.

If it's determined that this is common enough to do something about, we could wrap the defmethods in a check to make sure the thing is currently a multimethod, and print a warning if not.

Comment by Gary Fredericks [ 20/Jul/16 9:25 PM ]

Closing this since I don't expect it to be an issue worth working on. Can reopen if something changes.

Generated at Tue Jul 26 20:22:37 CDT 2016 using JIRA 4.4#649-r158309.