Open Tillaert opened 1 year ago
Thanks for reporting. What output do you get when you use polylith's default test runner?
Running tests for the t project using test runner: Polylith built-in clojure.test runner...
Running tests from the t project, including 1 brick and 1 project: b, t
clojure.lang.ExceptionInfo: Error while evaluating form (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote foo.t.foo-test)) (clojure.test/run-tests (quote foo.t.foo-test))) in class-loader. Cause: java.lang.reflect.InvocationTargetException; Syntax error compiling at (foo/b/core.clj:3:1).; java.lang.RuntimeException: Unable to resolve symbol: b in this context {:form (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote foo.t.foo-test)) (clojure.test/run-tests (quote foo.t.foo-test)))}
at polylith.clj.core.test_runner_orchestrator.core$__GT_eval_in_project$fn__9069.invoke(core.clj:81)
at polylith.clj.core.clojure_test_test_runner.core$run_test_statements$fn__31190.invoke(core.clj:59)
at polylith.clj.core.clojure_test_test_runner.core$run_test_statements.invokeStatic(core.clj:58)
at polylith.clj.core.clojure_test_test_runner.core$run_test_statements.invoke(core.clj:52)
at polylith.clj.core.clojure_test_test_runner.core$create$reify__31217.run_tests(core.clj:98)
at polylith.clj.core.test_runner_orchestrator.core$run_tests_for_project_with_test_runner.invokeStatic(core.clj:70)
at polylith.clj.core.test_runner_orchestrator.core$run_tests_for_project_with_test_runner.invoke(core.clj:59)
at polylith.clj.core.test_runner_orchestrator.core$run_tests_for_project.invokeStatic(core.clj:128)
at polylith.clj.core.test_runner_orchestrator.core$run_tests_for_project.invoke(core.clj:100)
at clojure.core$map$fn__5931$fn__5932.invoke(core.clj:2759)
at clojure.core$map$fn__5931$fn__5932.invoke(core.clj:2759)
at clojure.lang.ArraySeq.reduce(ArraySeq.java:114)
at clojure.core$transduce.invokeStatic(core.clj:6946)
at clojure.core$transduce.invoke(core.clj:6933)
at polylith.clj.core.test_runner_orchestrator.core$run.invokeStatic(core.clj:183)
at polylith.clj.core.test_runner_orchestrator.core$run.invoke(core.clj:168)
at polylith.clj.core.test_runner_orchestrator.interface$run.invokeStatic(interface.clj:5)
at polylith.clj.core.test_runner_orchestrator.interface$run.invoke(interface.clj:4)
at polylith.clj.core.command.test$run.invokeStatic(test.clj:11)
at polylith.clj.core.command.test$run.invoke(test.clj:5)
at polylith.clj.core.command.core$execute.invokeStatic(core.clj:88)
at polylith.clj.core.command.core$execute.invoke(core.clj:63)
at polylith.clj.core.command.interface$execute_command.invokeStatic(interface.clj:5)
at polylith.clj.core.command.interface$execute_command.invoke(interface.clj:4)
at polylith.clj.core.poly_cli.core$_main.invokeStatic(core.clj:33)
at polylith.clj.core.poly_cli.core$_main.doInvoke(core.clj:7)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.main$main_opt.invokeStatic(main.clj:514)
at clojure.main$main_opt.invoke(main.clj:510)
at clojure.main$main.invokeStatic(main.clj:664)
at clojure.main$main.doInvoke(main.clj:616)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:40)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at polylith.clj.core.common.class_loader$invoke_in_STAR_.invokeStatic(class_loader.clj:31)
at polylith.clj.core.common.class_loader$invoke_in_STAR_.doInvoke(class_loader.clj:27)
at clojure.lang.RestFn.invoke(RestFn.java:494)
at polylith.clj.core.common.class_loader$eval_in_STAR_$print_read_eval__287.invoke(class_loader.clj:49)
at polylith.clj.core.common.class_loader$eval_in_STAR_.invokeStatic(class_loader.clj:51)
at polylith.clj.core.common.class_loader$eval_in_STAR_.invoke(class_loader.clj:45)
at polylith.clj.core.common.class_loader$eval_in.invokeStatic(class_loader.clj:61)
at polylith.clj.core.common.class_loader$eval_in.invoke(class_loader.clj:60)
at polylith.clj.core.common.interface$eval_in.invokeStatic(interface.clj:23)
at polylith.clj.core.common.interface$eval_in.invoke(interface.clj:22)
at polylith.clj.core.test_runner_orchestrator.core$__GT_eval_in_project$fn__9069.invoke(core.clj:79)
... 35 more
Caused by: Syntax error compiling at (foo/b/core.clj:3:1).
at clojure.lang.Compiler.analyze(Compiler.java:6808)
at clojure.lang.Compiler.access$300(Compiler.java:38)
at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:596)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7107)
at clojure.lang.Compiler.analyze(Compiler.java:6789)
at clojure.lang.Compiler.analyze(Compiler.java:6745)
at clojure.lang.Compiler.eval(Compiler.java:7181)
at clojure.lang.Compiler.load(Compiler.java:7636)
at clojure.lang.RT.loadResourceScript(RT.java:381)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.load(RT.java:459)
at clojure.lang.RT.load(RT.java:424)
at clojure.core$load$fn__6839.invoke(core.clj:6126)
at clojure.core$load.invokeStatic(core.clj:6125)
at clojure.core$load.doInvoke(core.clj:6109)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5908)
at clojure.core$load_one.invoke(core.clj:5903)
at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)
at clojure.core$load_lib.invokeStatic(core.clj:5947)
at clojure.core$load_lib.doInvoke(core.clj:5928)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$load_libs.invokeStatic(core.clj:5985)
at clojure.core$load_libs.doInvoke(core.clj:5969)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$require.invokeStatic(core.clj:6007)
at clojure.core$require.doInvoke(core.clj:6007)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at foo.t.foo_test$eval146$loading__6721__auto____147.invoke(foo_test.clj:1)
at foo.t.foo_test$eval146.invokeStatic(foo_test.clj:1)
at foo.t.foo_test$eval146.invoke(foo_test.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:7177)
at clojure.lang.Compiler.eval(Compiler.java:7166)
at clojure.lang.Compiler.load(Compiler.java:7636)
at clojure.lang.RT.loadResourceScript(RT.java:381)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.load(RT.java:459)
at clojure.lang.RT.load(RT.java:424)
at clojure.core$load$fn__6839.invoke(core.clj:6126)
at clojure.core$load.invokeStatic(core.clj:6125)
at clojure.core$load.doInvoke(core.clj:6109)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5908)
at clojure.core$load_one.invoke(core.clj:5903)
at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)
at clojure.core$load_lib.invokeStatic(core.clj:5947)
at clojure.core$load_lib.doInvoke(core.clj:5928)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$load_libs.invokeStatic(core.clj:5985)
at clojure.core$load_libs.doInvoke(core.clj:5969)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$require.invokeStatic(core.clj:6007)
at clojure.core$require.doInvoke(core.clj:6007)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$eval142.invokeStatic(NO_SOURCE_FILE:0)
at clojure.core$eval142.invoke(NO_SOURCE_FILE)
at clojure.lang.Compiler.eval(Compiler.java:7177)
at clojure.lang.Compiler.eval(Compiler.java:7166)
at clojure.lang.Compiler.eval(Compiler.java:7132)
at clojure.core$eval.invokeStatic(core.clj:3214)
at clojure.core$eval.invoke(core.clj:3210)
at clojure.core$eval138.invokeStatic(NO_SOURCE_FILE:0)
at clojure.core$eval138.invoke(NO_SOURCE_FILE)
at clojure.lang.Compiler.eval(Compiler.java:7177)
at clojure.lang.Compiler.eval(Compiler.java:7132)
... 50 more
Caused by: java.lang.RuntimeException: Unable to resolve symbol: b in this context
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.Compiler.resolveIn(Compiler.java:7414)
at clojure.lang.Compiler.resolve(Compiler.java:7358)
at clojure.lang.Compiler.analyzeSymbol(Compiler.java:7319)
at clojure.lang.Compiler.analyze(Compiler.java:6768)
... 118 more
Couldn't run test statement for the t project: (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote foo.t.foo-test)) (clojure.test/run-tests (quote foo.t.foo-test))) clojure.lang.ExceptionInfo: Error while evaluating form (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote foo.t.foo-test)) (clojure.test/run-tests (quote foo.t.foo-test))) in class-loader. Cause: java.lang.reflect.InvocationTargetException; Syntax error compiling at (foo/b/core.clj:3:1).; java.lang.RuntimeException: Unable to resolve symbol: b in this context {:form (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote foo.t.foo-test)) (clojure.test/run-tests (quote foo.t.foo-test)))}
Test results: passes, failures, errors.
Thanks. Any chance you can share a repro case for this?
Will this do? https://github.com/Tillaert/kaocha-runner-issue
Perfect, thank you. I'll try to look into this the coming week.
Any luck with this issue?
Nothing yet I'm afraid, been swamped both at work and home. Might have the opportunity to check tomorrow but I don't mind PRs either.
When I use Kaocha with a deps.edn:
Compile errors and failing test locatoins are reported correctly:
With polylith and polylith-koacha
It does not report the compilation error, just the error that reports that it cannot find the file with the error: