Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reflection warnings #221

Merged
merged 1 commit into from
Oct 31, 2016
Merged

Fix reflection warnings #221

merged 1 commit into from
Oct 31, 2016

Conversation

sfnelson
Copy link

Adds type hints where indicated by compiler, and enable refection warnings in
leiningen builds to help avoid future regressions.

Adds type hints where indicated by compiler, and enable refection warnings in
leiningen builds to help avoid future regressions.
@sfnelson
Copy link
Author

Thanks for releasing #219. Unfortunately, master had introduced a new reflection warning since that pull request was made and so this library is still causing noise in our builds. Could you please consider this pull request that resolves two more warnings and enables reflection warnings for the project in general, so that future contributors will be reminded to add type hints?

@seancorfield seancorfield merged commit 951e916 into clj-time:master Oct 31, 2016
@seancorfield
Copy link
Member

👍 I'll cut 0.12.2 with this in.

@seancorfield
Copy link
Member

Just so you're aware, with reflection warnings turned on for testing clj-time, it produces these warnings:

Reflection warning, such/vars.clj:26:3 - reference to field sym can't be resolved.
Reflection warning, such/wrongness.clj:16:46 - call to static method aset on clojure.lang.RT can't be resolved (argument types: unknown, int, java.lang.Class).
Reflection warning, such/wrongness.clj:16:23 - call to method getConstructor on java.lang.Object can't be resolved (no such method).
Reflection warning, such/wrongness.clj:18:47 - call to static method aset on clojure.lang.RT can't be resolved (argument types: unknown, int, unknown).
Reflection warning, such/wrongness.clj:18:21 - call to method newInstance can't be resolved (target class is unknown).
Reflection warning, such/casts.clj:144:28 - reference to field ns can't be resolved.
Reflection warning, such/casts.clj:144:39 - reference to field sym can't be resolved.
Reflection warning, com/rpl/specter/impl.clj:201:7 - call to java.lang.IllegalArgumentException ctor can't be resolved.
Reflection warning, com/rpl/specter/impl.clj:307:17 - call to java.lang.IllegalArgumentException ctor can't be resolved.
Performance warning, com/rpl/specter/impl.clj:516:7 - case has int tests, but tested expression is not primitive.
Reflection warning, com/rpl/specter/impl.clj:919:5 - call to java.lang.IllegalArgumentException ctor can't be resolved.
Reflection warning, com/rpl/specter/impl.clj:1047:7 - call to java.lang.IllegalArgumentException ctor can't be resolved.
Reflection warning, com/rpl/specter/impl.clj:1215:9 - call to java.lang.IllegalArgumentException ctor can't be resolved.
Reflection warning, com/rpl/specter/impl.clj:1232:7 - call to java.lang.IllegalArgumentException ctor can't be resolved.
Reflection warning, com/rpl/specter/impl.clj:1238:32 - call to java.lang.IllegalArgumentException ctor can't be resolved.
Reflection warning, com/rpl/specter/impl.clj:1276:11 - call to java.lang.IllegalArgumentException ctor can't be resolved.
Reflection warning, com/rpl/specter/impl.clj:1276:11 - call to java.lang.IllegalArgumentException ctor can't be resolved.
Reflection warning, com/rpl/specter/macros.clj:10:5 - call to java.lang.IllegalArgumentException ctor can't be resolved.
Reflection warning, such/readable.clj:146:36 - call to method substring on java.lang.Object can't be resolved (no such method).
Reflection warning, such/readable.clj:150:36 - call to method substring on java.lang.Object can't be resolved (no such method).
Reflection warning, midje/util/ecosystem.clj:41:12 - call to java.io.File ctor can't be resolved.
Reflection warning, midje/util/pile.clj:107:9 - call to method contains can't be resolved (target class is unknown).
Reflection warning, midje/config.clj:19:32 - call to method contains can't be resolved (target class is unknown).
Reflection warning, midje/emission/clojure_test_facade.clj:33:21 - reference to field toString can't be resolved.
Reflection warning, midje/emission/plugins/util.clj:101:8 - reference to field getClass can't be resolved.
Reflection warning, midje/emission/plugins/util.clj:101:8 - reference to field getName can't be resolved.
Reflection warning, flare/string.clj:23:24 - reference to field operation can't be resolved.
Reflection warning, flare/string.clj:23:43 - reference to field text can't be resolved.
Reflection warning, pointer/core.clj:36:5 - reference to field getFileName can't be resolved.
Reflection warning, midje/data/metaconstant.clj:43:5 - reference to field getNamespace on java.lang.Object can't be resolved.
Reflection warning, midje/checking/checkers/chatty.clj:61:20 - call to java.lang.Error ctor can't be resolved.
Reflection warning, midje/checking/checkers/simple.clj:86:24 - reference to field throwable can't be resolved.
Reflection warning, midje/data/compendium.clj:60:38 - call to method indexOf can't be resolved (target class is unknown).

Which are all in Midje or its dependencies...

@seancorfield
Copy link
Member

Release 0.12.2 is on Clojars.

@sfnelson
Copy link
Author

Thanks. I only ran lein test so I didn't see the midje warnings. Not much you can do about those unfortunately, but at least downstream users won't be affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants