technomancy/swank-clojure — Issue #96: Eliminate Reflection Warnings
Author: ath
Created: 2012-01-05 18:05:23+00:00
State: open

In my project.clj file I typically set the option :warn-on-reflection true, and this way I noticed the following warnings in swank-clojure 1.4.0-SNAPSHOT:

M:\project>lein swank
Reflection warning, swank/util/concurrent/thread.clj:13 - call to java.lang.Thread ctor can't be resolved.
Reflection warning, swank/util/io.clj:15 - call to java.lang.String ctor can't be resolved.
Reflection warning, swank/util/io.clj:16 - call to java.lang.String ctor can't be resolved.
Reflection warning, swank/rpc.clj:21 - call to write can't be resolved.
Reflection warning, swank/rpc.clj:22 - reference to field flush can't be resolved.
Reflection warning, swank/rpc.clj:58 - call to unread can't be resolved.
Reflection warning, swank/rpc.clj:59 - call to unread can't be resolved.
Reflection warning, swank/rpc.clj:105 - call to write can't be resolved.
Reflection warning, swank/rpc.clj:123 - reference to field length can't be resolved.
Reflection warning, swank/rpc.clj:124 - call to write can't be resolved.
Reflection warning, swank/core/protocol.clj:42 - call to replaceAll can't be resolved.
Reflection warning, swank/core.clj:125 - reference to field getStackTrace can't be resolved.
Reflection warning, swank/core.clj:147 - reference to field getMessage can't be resolved.
Reflection warning, swank/core.clj:153 - reference to field getCause can't be resolved.
Reflection warning, swank/core.clj:158 - reference to field getCause can't be resolved.
Reflection warning, swank/core.clj:171 - reference to field getMessage can't be resolved.
Reflection warning, swank/core.clj:172 - reference to field getMessage can't be resolved.
Reflection warning, swank/core.clj:172 - call to contains can't be resolved.
Reflection warning, swank/commands/xref.clj:20 - reference to field read can't be resolved.
Reflection warning, swank/commands/basic.clj:58 - call to java.io.File ctor can't be resolved.
Reflection warning, swank/commands/basic.clj:165 - call to java.io.FileReader ctor can't be resolved.
Reflection warning, swank/commands/basic.clj:351 - reference to field ns can't be resolved.
Reflection warning, swank/commands/basic.clj:351 - reference to field name can't be resolved.
Reflection warning, swank/commands/basic.clj:351 - reference to field sym can't be resolved.
Reflection warning, swank/commands/basic.clj:377 - reference to field sym can't be resolved.
Reflection warning, swank/commands/basic.clj:377 - reference to field sym can't be resolved.
Reflection warning, swank/commands/basic.clj:427 - call to replace can't be resolved.
Reflection warning, swank/commands/basic.clj:495 - reference to field getName can't be resolved.
Reflection warning, swank/commands/basic.clj:496 - reference to field getMethods can't be resolved.
Reflection warning, swank/commands/basic.clj:585 - reference to field activeCount can't be resolved.
Reflection warning, swank/commands/basic.clj:586 - call to enumerate can't be resolved.
Reflection warning, swank/commands/basic.clj:606 - reference to field stop can't be resolved.
Reflection warning, swank/commands/completion.clj:58 - call to contains can't be resolved.
Reflection warning, swank/commands/completion.clj:59 - call to contains can't be resolved.
Reflection warning, swank/commands/inspector.clj:117 - call to alength can't be resolved.
Reflection warning, swank/commands/inspector.clj:153 - call to getName can't be resolved.
Reflection warning, swank/commands/inspector.clj:155 - call to setAccessible can't be resolved.
Reflection warning, swank/commands/inspector.clj:157 - call to get can't be resolved.
Connection opened on localhost port 4005.
Reflection warning, swank/swank.clj:38 - reference to field interrupt can't be resolved.
Reflection warning, swank/swank.clj:63 - reference to field join can't be resolved.
Reflection warning, swank/swank.clj:63 - reference to field join can't be resolved.
Reflection warning, swank/swank.clj:69 - call to java.lang.Integer ctor can't be resolved.

Would be nice if you could remove them, and also include that option in the project.clj file.