Fork me on GitHub
#kaocha
<
2021-02-10
>
plexus06:02:18

@holyjak yes, there's a built-in plugin for that, have a look at the documentation

Jakub Holý (HolyJak)08:02:08

ok, thanks, will have a better look then before then, Thaanks for pointing me to the plugins!

Jakub Holý (HolyJak)08:02:05

For posterity - I guess it is --plugin kaocha.plugin/profiling

👍 4
richiardiandrea20:02:23

Hi there! My codebase has good a lot of Reflection Warnings that I would like to intercept and fail in CI. Is there some facility I can use with kaocha in order to achieve that?

richiardiandrea20:02:44

(is it a worthy idea anyways?

Alys Brooks22:02:11

Not Kaocha specific, but it looks like the Clojure source has a non-exported macro that does this: https://github.com/clojure/clojure/blob/cbb3fdf787a00d3c1443794b97ed7fe4bef8e888/test/clojure/test_helper.clj#L126. You could try copying it to your test suite (probably with some sort of copyright notice)?

richiardiandrea01:02:46

thanks you did not know that, pretty handy

Alys Brooks22:02:45

As for whether it's a good idea...it depends on how much reflection you have, and how important it is to avoid. If you have a large existing codebase that you haven't made special efforts to avoid reflection in, it might be pretty noisy. But if you're starting with relatively little reflection, and getting it down to zero is a priority, I could see it being helpful.

👍 4
Alys Brooks22:02:05

Are you trying to avoid reflection for performance reasons or for native-image compatibility or for some other reason?

richiardiandrea01:02:31

I guess is both, we are trying pretty heavily to keep everything hinted. I have also just inherited the code base and still learning 😄