Fork me on GitHub
#polylith
<
2023-01-20
>
Eugen14:01:05

hi, I noticed we are getting an exception in polylith for which we cannot find the cause (yet). Has anyone saw something similar? Full exception in thread:

Couldn't run test statement for the ontolog project: (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote )) (clojure.test/run-tests (quote ))) clojure.lang.ExceptionInfo: Error while evaluating form (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote )) (clojure.test/run-tests (quote ))) in class-loader. Cause: java.lang.reflect.InvocationTargetException; Syntax error compiling quote at (0:0).
Wrong number of args (0) passed to quote; clojure.lang.ExceptionInfo: Wrong number of args (0) passed to quote {:form (quote)} {:form (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote )) (clojure.test/run-tests (quote )))}

Eugen14:01:44

clojure.lang.ExceptionInfo: Error while evaluating form (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote )) (clojure.test/run-tests (quote ))) in class-loader. Cause: java.lang.reflect.InvocationTargetException; Syntax error compiling quote at (0:0).
Wrong number of args (0) passed to quote; clojure.lang.ExceptionInfo: Wrong number of args (0) passed to quote {:form (quote)} {:form (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote )) (clojure.test/run-tests (quote )))}
        at polylith.clj.core.test_runner_orchestrator.core$__GT_eval_in_project$fn__9252.invoke(core.clj:110)
        at polylith.clj.core.clojure_test_test_runner.core$run_test_statements$fn__31730.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__31757.run_tests(core.clj:98)
        at polylith.clj.core.test_runner_orchestrator.core$run_tests_for_project_with_test_runner.invokeStatic(core.clj:88)
        at polylith.clj.core.test_runner_orchestrator.core$run_tests_for_project_with_test_runner.invoke(core.clj:77)
        at polylith.clj.core.test_runner_orchestrator.core$run_tests_for_project.invokeStatic(core.clj:159)
        at polylith.clj.core.test_runner_orchestrator.core$run_tests_for_project.invoke(core.clj:129)
        at polylith.clj.core.test_runner_orchestrator.core$run.invokeStatic(core.clj:214)
        at polylith.clj.core.test_runner_orchestrator.core$run.invoke(core.clj:197)
        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:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        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__9252.invoke(core.clj:108)
        ... 30 more
Caused by: Syntax error compiling quote at (0:0).
Wrong number of args (0) passed to quote
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7132)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyze(Compiler.java:6762)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3900)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7126)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyze(Compiler.java:6762)
        at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6137)
        at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5479)
        at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4041)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7122)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.eval(Compiler.java:7191)
        at clojure.lang.Compiler.eval(Compiler.java:7183)
        at clojure.lang.Compiler.eval(Compiler.java:7149)
        at clojure.core$eval.invokeStatic(core.clj:3215)
        at clojure.core$eval.invoke(core.clj:3211)
        at clojure.core$eval3647.invokeStatic(NO_SOURCE_FILE:0)
        at clojure.core$eval3647.invoke(NO_SOURCE_FILE)
        at clojure.lang.Compiler.eval(Compiler.java:7194)
        at clojure.lang.Compiler.eval(Compiler.java:7149)
        ... 45 more
Caused by: clojure.lang.ExceptionInfo: Wrong number of args (0) passed to quote {:form (quote)}
        at clojure.lang.Compiler$ConstantExpr$Parser.parse(Compiler.java:2016)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7124)
        ... 65 more
Couldn't run test statement for the ontolog project: (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote )) (clojure.test/run-tests (quote ))) clojure.lang.ExceptionInfo: Error while evaluating form (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote )) (clojure.test/run-tests (quote ))) in class-loader. Cause: java.lang.reflect.InvocationTargetException; Syntax error compiling quote at (0:0).
Wrong number of args (0) passed to quote; clojure.lang.ExceptionInfo: Wrong number of args (0) passed to quote {:form (quote)} {:form (do (clojure.core/use (quote clojure.test)) (clojure.core/require (quote )) (clojure.test/run-tests (quote )))}

Test results:  passes,  failures,  errors.

tengstrand15:01:01

Is it possible to create a small public example repository/workspace where you can reproduce the error?

Eugen18:01:07

unfortunatelly no, but I ran tests with divide et impera on each commit

Eugen18:01:16

found the ones that fail and the ones that do not

Eugen18:01:23

will see what is the issue

Eugen18:01:29

and get back

Eugen17:01:48

yeah, I tracked the issue down to a config.clj file that did not have a (ns ...) declaration. The file is a map

Eugen17:01:16

;; (ns my.config)
;; without the ns declaration above, polylith fails with a strange exception 

{:sentry {:dsn ""
          :environment ""}}

Eugen17:01:40

the ns declaration is commented and in this case, poly test will fail

tengstrand18:01:28

Can you create an issue?

Eugen18:01:06

added all the details I knew

👍 2
jeroenvandijk07:01:59

@U011NGC5FFY i also had issues in the past that were very hard to find through my own code. Using a local clone of polylith and putting debug statements around the lines where the error occurred helped me to identify the cause though. HTH

👍 2