Fork me on GitHub
#kaocha
<
2021-04-13
>
Margo12:04:43

Good afternoon everyone! I have recently purchased a new Mac M1 with Apple silicon and it looks like kaocha doen't work in there. I was advised to join this channel.

dharrigan12:04:03

It runs for me fine on my Mac Mini M1

dharrigan12:04:15

You'll need to elaborate further on what specifically is not working.

Margo12:04:18

I can tell that, yes

Margo12:04:58

I have kaocha with lein on the project,

Margo12:04:03

[lambdaisland/kaocha "1.0.669"]
                                [lambdaisland/kaocha-junit-xml "0.0.76"]

Margo12:04:16

:aliases {"kaocha" ["with-profile" "test" "run" "-m" "kaocha.runner"]

Margo12:04:38

as I run

lein kaocha unit

Margo12:04:03

ERROR in unit (core.clj:6)
Exception: clojure.lang.Compiler$CompilerException: Syntax error macroexpanding at (core.clj:6:3).
#:clojure.error{:phase :execution, :line 6, :column 3, :source "core.clj"}
 at clojure.lang.Compiler$InvokeExpr.eval (Compiler.java:3707)

dharrigan12:04:39

Perhaps best to upgrade to the latest kaocha, you're quite behind

dharrigan12:04:52

and are you running with an ARM JVM?

Margo12:04:24

I would need to run it by my team (the upgrade part)

dharrigan12:04:44

You can try locally first, no?

Margo12:04:54

Sure, I meant in general

Margo12:04:18

I meant I would need to be able to work with the current setup before we upgrade

Margo12:04:28

I do not think I am running ARM JVM

Margo12:04:32

How can I check?

dharrigan12:04:37

java --version

Margo12:04:11

openjdk 16 2021-03-16
OpenJDK Runtime Environment AdoptOpenJDK (build 16+36)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 16+36, mixed mode, sharing)

dharrigan12:04:18

yup, non arm

Margo12:04:27

ok, so I would need arm?

dharrigan12:04:41

I would suggest yes

Margo12:04:37

May I ask about more info/pointers as to why?

Margo12:04:52

I mean, I get it, to get kaocha to work in my case, but in general?

dharrigan12:04:12

You are running the JVM under a translation layer, rosetta2

dharrigan12:04:19

there are no guarantees

dharrigan12:04:34

best use a JVM that is designed to run specifically with your chipset.

dharrigan12:04:49

Until there is a release of openjdk/adoptjdk that has ARM support

Margo12:04:25

I have done some digging, can you maybe tell me your version of java?

Margo12:04:35

If that is ok, of coarse

dharrigan12:04:53

❯ java --version
openjdk 11.0.10 2021-01-19 LTS
OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS)
OpenJDK 64-Bit Server VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode)

dharrigan12:04:55

nothing to hide

dharrigan12:04:10

I'm running the Azul ARM JVM

Margo12:04:03

Instaled through Zulu, trying to change java version

Alys Brooks20:04:10

Hmm, that's unfortunate. Can you attach the whole stacktrace?

Margo12:04:26

So, the issue is:

schmandle13:04:30

Anybody else experiencing problems using Kaocha with the latest Clojurescript?

schmandle13:04:39

rose on  command-result-cache [!?] 🐳  took 10s
❯ grep clojurescript deps.edn
         org.clojure/clojurescript {:mvn/version "1.10.773"}

rose on  command-result-cache [!?] 🐳 
❯ bin/kaocha
WARNING: Wrong number of args (2) passed to IndexedSeq at line 16 file:/home/kjetil/.m2/repository/thinktopic/aljabr/0.1.1/aljabr-0.1.1.jar!/thinktopic/aljabr/core.cljc
unit:   100% [==================================================] 279/279
279 tests, 1105 assertions, 0 failures.

rose on  command-result-cache [!?] 🐳  took 1m1s
❯ git checkout -- deps.edn

rose on  command-result-cache [!?] 🐳 
❯ grep clojurescript deps.edn
         org.clojure/clojurescript {:mvn/version "1.10.844"}

rose on  command-result-cache [!?] 🐳 
❯ bin/kaocha
WARNING: Wrong number of args (2) passed to IndexedSeq at line 16 file:/home/kjetil/.m2/repository/thinktopic/aljabr/0.1.1/aljabr-0.1.1.jar!/thinktopic/aljabr/core.cljc
unit:     0% [                                                  ]   0/279

Randomized with --seed 2049207396
ERROR in unit (main.java:40)
Unexpected error executing kaocha-cljs test suite.
Exception: clojure.lang.ExceptionInfo: ClojureScript Error while loading Kaocha websocket client
{:val {:via [{:type clojure.lang.ExceptionInfo, :message "Execution error (TypeError) at (<cljs repl>:1).\nlambdaisland.glogi.logger.call(...).addHandler is not a function\n", :data {:type :js-eval-exception, :error {:status :exception, :value "Execution error (TypeError) at (<cljs repl>:1).\nlambdaisland.glogi.logger.call(...).addHandler is not a function\n"}, :repl-env #cljs.repl.node.NodeEnv{:host "localhost", :port 58289, :path nil, :socket #object[clojure.lang.Atom 0x42f183d1 {:status :ready, :val {:socket #object[java.net.Socket 0x2b80cd8f "Socket[addr=localhost/127.0.0.1,port=58289,localport=34156]"], :in #object[java.io.BufferedReader 0x6736791a "[email protected]"], :out #object[java.io.BufferedWriter 0x1d868003 "[email protected]"]}}], :proc #object[clojure.lang.Atom 0x53276769 {:status :ready, :val #object[java.lang.ProcessImpl 0x7ee63437 "Process[pid=30391, exitValue=137]"]}], :state #object[clojure.lang.Atom 0x2acc6c58 {:status :ready, :val {:listeners 0}}], :debug-port nil}, :form (require (quote kaocha.cljs.websocket-client) (quote kaocha.cljs.run)), :js "goog.require('kaocha.cljs.websocket_client');\ngoog.require('kaocha.cljs.run');\n'nil';\n"}, :at [cljs.repl$evaluate_form invokeStatic "repl.cljc" 577]}], :trace [[cljs.repl$evaluate_form invokeStatic "repl.cljc" 577] [cljs.repl$evaluate_form invoke "repl.cljc" 498] [cljs.repl$eval_cljs invokeStatic "repl.cljc" 692] [cljs.repl$eval_cljs invoke "repl.cljc" 685] [kaocha.cljs.queue_eval_loop$start_BANG_$fn__3934$fn__3939 invoke "queue_eval_loop.clj" 78] [kaocha.cljs.queue_eval_loop$start_BANG_$fn__3934 invoke "queue_eval_loop.clj" 69] [cljs.compiler$with_core_cljs invokeStatic "compiler.cljc" 1456] [cljs.compiler$with_core_cljs invoke "compiler.cljc" 1445] [kaocha.cljs.queue_eval_loop$start_BANG_ invokeStatic "queue_eval_loop.clj" 55] [kaocha.cljs.queue_eval_loop$start_BANG_ doInvoke "queue_eval_loop.clj" 40] [clojure.lang.RestFn invoke "RestFn.java" 470] [kaocha.cljs.prepl$prepl$fn__3955$fn__3956 invoke "prepl.clj" 14] [kaocha.cljs.prepl$prepl$fn__3955 invoke "prepl.clj" 13] [clojure.core$binding_conveyor_fn$fn__5772 invoke "core.clj" 2034] [clojure.lang.AFn call "AFn.java" 18] [java.util.concurrent.FutureTask run "FutureTask.java" 264] [java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1130] [java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 630] [java.lang.Thread run "Thread.java" 832]], :cause "Execution error (TypeError) at (<cljs repl>:1).\nlambdaisland.glogi.logger.call(...).addHandler is not a function\n", :data {:type :js-eval-exception, :error {:status :exception, :value "Execution error (TypeError) at (<cljs repl>:1).\nlambdaisland.glogi.logger.call(...).addHandler is not a function\n"}, :repl-env #cljs.repl.node.NodeEnv{:host "localhost", :port 58289, :path nil, :socket #object[clojure.lang.Atom 0x42f183d1 {:status :ready, :val {:socket #object[java.net.Socket 0x2b80cd8f "Socket[addr=localhost/127.0.0.1,port=58289,localport=34156]"], :in #object[java.io.BufferedReader 0x6736791a "[email protected]"], :out #object[java.io.BufferedWriter 0x1d868003 "[email protected]"]}}], :proc #object[clojure.lang.Atom 0x53276769 {:status :ready, :val #object[java.lang.ProcessImpl 0x7ee63437 "Process[pid=30391, exitValue=137]"]}], :state #object[clojure.lang.Atom 0x2acc6c58 {:status :ready, :val {:listeners 0}}], :debug-port nil}, :form (require (quote kaocha.cljs.websocket-client) (quote kaocha.cljs.run)), :js "goog.require('kaocha.cljs.websocket_client');\ngoog.require('kaocha.cljs.run');\n'nil';\n"}}, :ns "cljs.user", :form "(require (quote kaocha.cljs.websocket-client) (quote kaocha.cljs.run))", :type :cljs/ret}
 at kaocha.type.cljs$eval7043$fn__7045$fn__7050.invoke (cljs.clj:263)
    kaocha.type.cljs$queue_consumer.invokeStatic (cljs.clj:188)
    kaocha.type.cljs$queue_consumer.invoke (cljs.clj:173)
    kaocha.type.cljs$eval7043$fn__7045.invoke (cljs.clj:258)
    ...
    kaocha.plugin.capture_output$capture_output_wrap_run_hook$fn__2318$fn__2319.invoke (capture_output.clj:83)
    ...
    kaocha.plugin.capture_output$capture_output_wrap_run_hook$fn__2318.doInvoke (capture_output.clj:83)
    ...
    kaocha.testable$run.invokeStatic (testable.clj:128)
    kaocha.testable$run.invoke (testable.clj:119)
    kaocha.testable$run_testable.invokeStatic (testable.clj:212)
    kaocha.testable$run_testable.invoke (testable.clj:157)
    kaocha.testable$run_testables.invokeStatic (testable.clj:225)
    kaocha.testable$run_testables.invoke (testable.clj:215)
    kaocha.api$run$fn__2825$fn__2826$fn__2827.invoke (api.clj:138)
    ...
    kaocha.api$run$fn__2825$fn__2826.invoke (api.clj:112)
    ...
    kaocha.api$run$fn__2825.invoke (api.clj:111)
    ...
    kaocha.api$run.invokeStatic (api.clj:98)
    kaocha.api$run.invoke (api.clj:85)
    kaocha.runner$run.invokeStatic (runner.clj:135)
    kaocha.runner$run.invoke (runner.clj:76)
    kaocha.runner$_main_STAR_.invokeStatic (runner.clj:179)
    kaocha.runner$_main_STAR_.doInvoke (runner.clj:147)
    ...
    kaocha.runner$_main.invokeStatic (runner.clj:190)
    kaocha.runner$_main.doInvoke (runner.clj:188)
    ...
0 tests, 1 assertions, 1 errors, 0 failures.

rose on  command-result-cache [!?] 🐳  took 42s
❯