ane / task

simple and functional concurrency primitives for Clojure

Home Page:https://ane.github.io/task/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix reflection warnings

esuomi opened this issue · comments

Reflection warning, task/core.clj:79:51 - call to method exceptionally on java.util.concurrent.CompletableFuture can't be resolved (argument types: unknown).
Reflection warning, task/core.clj:84:45 - reference to field getCause can't be resolved.
Reflection warning, task/core.clj:95:27 - call to method get on long can't be resolved (no such method).
Reflection warning, task/core.clj:144:13 - reference to field isDone can't be resolved.
Reflection warning, task/core.clj:145:16 - reference to field get can't be resolved.
Reflection warning, task/core.clj:146:16 - reference to field get can't be resolved.
Reflection warning, task/core.clj:154:18 - call to method thenApplyAsync can't be resolved (target class is unknown).
Reflection warning, task/core.clj:180:18 - call to method thenComposeAsync can't be resolved (target class is unknown).
Reflection warning, task/core.clj:264:5 - call to method completeExceptionally can't be resolved (target class is unknown).

How did you encounter these issues?

In my Lein project.clj added :global-vars {*warn-on-reflection* true} and it started yelling at me :(

Right... um... I'll look into this. Basically I just have to add lots of type hints everywhere.