marick/Midje — Issue #83: Reflection Warnings
Author: ath
Created: 2012-01-05 10:45:42+00:00
State: open

In my project.clj files I typically include the option :warn-on-reflection true. For Midje 1.3.1 I get the following warnings:

Reflection warning, midje/util/thread_safe_var_nesting.clj:33 - call to bindRoot can't be resolved.
Reflection warning, midje/util/old_clojure_contrib/ns_utils.clj:60 - reference to field hasRoot can't be resolved.
Reflection warning, midje/util/old_clojure_contrib/ns_utils.clj:60 - reference to field hasRoot can't be resolved.
Reflection warning, midje/util/old_clojure_contrib/ns_utils.clj:60 - reference to field hasRoot can't be resolved.
Reflection warning, midje/util/old_clojure_contrib/ns_utils.clj:60 - reference to field hasRoot can't be resolved.
Reflection warning, midje/internal_ideas/file_position.clj:47 - reference to field getFileName can't be resolved.
Reflection warning, midje/internal_ideas/file_position.clj:47 - reference to field getLineNumber can't be resolved.
Reflection warning, midje/util/exceptions.clj:17 - reference to field toString can't be resolved.
Reflection warning, midje/util/exceptions.clj:17 - reference to field getStackTrace can't be resolved.
Reflection warning, midje/util/exceptions.clj:29 - reference to field toString can't be resolved.
Reflection warning, midje/util/exceptions.clj:33 - reference to field toString can't be resolved.
Reflection warning, midje/util/colorize.clj:9 - reference to field toUpperCase can't be resolved.
Reflection warning, midje/util/report.clj:11 - reference to field hasRoot can't be resolved.
Reflection warning, midje/util/report.clj:12 - call to bindRoot can't be resolved.
Reflection warning, midje/checkers.clj:11 - reference to field hasRoot can't be resolved.
Reflection warning, midje/checkers.clj:11 - reference to field hasRoot can't be resolved.
Reflection warning, midje/checkers/extended_equality.clj:26 - reference to field toString can't be resolved.
Reflection warning, midje/checkers/extended_equality.clj:26 - reference to field toString can't be resolved.
Reflection warning, midje/checkers/simple.clj:66 - reference to field getMessage can't be resolved.
Reflection warning, midje/checkers/collection.clj:468 - reference to field toString can't be resolved.
Reflection warning, midje/checkers/collection.clj:471 - reference to field toString can't be resolved.
Reflection warning, midje/ideas/metaconstants.clj:52 - call to containsKey can't be resolved.
Reflection warning, midje/ideas/metaconstants.clj:35 - reference to field name can't be resolved.
Reflection warning, midje/ideas/metaconstants.clj:88 - reference to field name can't be resolved.
Reflection warning, midje/internal_ideas/fakes.clj:195 - reference to field name can't be resolved.
Reflection warning, midje/internal_ideas/fakes.clj:195 - reference to field storage can't be resolved.
Reflection warning, midje/internal_ideas/fakes.clj:195 - reference to field storage can't be resolved.
Reflection warning, midje/ideas/prerequisites.clj:26 - call to java.lang.Integer ctor can't be resolved.

Would be nice if you could eliminate those, and perhaps include a reflection check in the project.clj file.