Hi, I’m configuring the polylith-kaocha wrapper, following the instructions on https://github.com/imrekoszo/polylith-kaocha. However, when I run clojure -M:poly test :verbose , I get the following error:
ERROR in unit (load.clj:48)
Failed loading tests:
Exception: java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "key" is null
at java.util.concurrent.ConcurrentHashMap.get (ConcurrentHashMap.java:936)
...
kaocha.type.ns$eval4321$fn__4322.invoke (ns.clj:38)
...
kaocha.testable$load.invokeStatic (testable.clj:94)
kaocha.testable$load.invoke (testable.clj:75)
kaocha.testable$load_testables.invokeStatic (testable.clj:153)
kaocha.testable$load_testables.invoke (testable.clj:145)
kaocha.load$load_test_namespaces.invokeStatic (load.clj:48)
kaocha.load$load_test_namespaces.doInvoke (load.clj:36)
...
kaocha.type.clojure.test$eval5747$fn__5748.invoke (test.clj:16)
...
kaocha.testable$load.invokeStatic (testable.clj:94)
kaocha.testable$load.invoke (testable.clj:75)
kaocha.testable$load_testables.invokeStatic (testable.clj:153)
kaocha.testable$load_testables.invoke (testable.clj:145)
kaocha.api$test_plan.invokeStatic (api.clj:58)
kaocha.api$test_plan.invoke (api.clj:51)
kaocha.api$run$fn__3692.invoke (api.clj:103)
...
Any pointers from anyone on where I might be going wrong here?This already happens inside kaocha itself so at least the connection is working. Do you have a test.edn you can share?
I don’t have a custom test.edn right now, should it default to the default-tests.edn in the wrapper in this case?
It should, yes. Was just wondering if it could have anything to do with it.
Unfortunately the stack trace doesn't say much, it points to somewhere around here: https://github.com/lambdaisland/kaocha/blob/15e553ddba5497a91099f0edda8433d66ef1094f/src/kaocha/type/ns.clj#L38C17-L39
So I'm guessing it has trouble loading a namespace perhaps
I'd try narrowing the scope of the test run to see if I can locate the problematic namespace
Thanks, I’ll try that
not sure if related, i noticed some bugs with test on <=0.2.19, we're on 0.2.20 now.
Hi, I'm having difficulty attempting to implement the same interface in multiple components (only one of which is included in any given project), but poly info is giving me an error that makes it look as if because I have it included in one component not declared as a dependency of one of the projects it can't find the same namespace as defined in the component actually defined as a dependency of the project. I've checked and the signatures are 100% identical - not sure what I'm doing wrong here, as the poly documentation seems to indicate I should be able to do this.
Can you provide a bit more detail? At work we have multiple implementations of a couple of interfaces. What exactly is the error? What exactly are your namespaces and component names?
@seancorfield Nevermind, I figured it out, was doing something stupid. Thanks for responding anyway!
Would you share? Maybe it's something that could be clearer in the docs or examples?