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

Reflection warnings #67

Closed
raszi opened this issue Feb 28, 2024 · 2 comments · Fixed by #68
Closed

Reflection warnings #67

raszi opened this issue Feb 28, 2024 · 2 comments · Fixed by #68

Comments

@raszi
Copy link

raszi commented Feb 28, 2024

First of all, thank you for the library!

We can still see some reflection warnings using your library:

Reflection warning, diehard/rate_limiter.clj:34:9 - call to static method sleep on java.lang.Thread can't be resolved (argument types: unknown).
Reflection warning, diehard/rate_limiter.clj:45:13 - call to static method sleep on java.lang.Thread can't be resolved (argument types: unknown).
Reflection warning, diehard/circuit_breaker.clj:78:3 - reference to field allowsExecution on dev.failsafe.CircuitBreaker can't be resolved.
Reflection warning, diehard/core.clj:62:39 - reference to field getConfig can't be resolved.
Reflection warning, diehard/core.clj:83:11 - call to method withBackoff on dev.failsafe.RetryPolicyBuilder can't be resolved (argument types: java.lang.Object, java.lang.Object, java.time.temporal.ChronoUnit).

I believe it would be a good idea to add a call to (set! *warn-on-reflection* true) in the test suite or something like that to avoid regressions.

@raszi
Copy link
Author

raszi commented Feb 28, 2024

$ java -version
openjdk version "19.0.2" 2023-01-17
OpenJDK Runtime Environment Temurin-19.0.2+7 (build 19.0.2+7)
OpenJDK 64-Bit Server VM Temurin-19.0.2+7 (build 19.0.2+7, mixed mode)

@sunng87
Copy link
Owner

sunng87 commented Feb 28, 2024

We used to have this global option in lein config. Now in deps.edn there is no alternative way to do so.

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 a pull request may close this issue.

2 participants