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.
It runs for me fine on my Mac Mini M1
You'll need to elaborate further on what specifically is not working.
I can tell that, yes
Hmm, that's unfortunate. Can you attach the whole stacktrace?
So, the issue is:
I have kaocha with lein on the project,
[lambdaisland/kaocha "1.0.669"]
[lambdaisland/kaocha-junit-xml "0.0.76"]
:aliases {"kaocha" ["with-profile" "test" "run" "-m" "kaocha.runner"]
as I run
lein kaocha unit
I get:
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)
Two things
Perhaps best to upgrade to the latest kaocha, you're quite behind
and are you running with an ARM JVM?
I would need to run it by my team (the upgrade part)
You can try locally first, no?
Sure, I meant in general
I meant I would need to be able to work with the current setup before we upgrade
I do not think I am running ARM JVM
How can I check?
java --version
openjdk 16 2021-03-16
OpenJDK Runtime Environment AdoptOpenJDK (build 16+36)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 16+36, mixed mode, sharing)
yup, non arm
ok, so I would need arm?
I would suggest yes
May I ask about more info/pointers as to why?
I mean, I get it, to get kaocha to work in my case, but in general?
Yes
You are running the JVM under a translation layer, rosetta2
there are no guarantees
best use a JVM that is designed to run specifically with your chipset.
Until there is a release of openjdk/adoptjdk that has ARM support
I have done some digging, can you maybe tell me your version of java?
If that is ok, of coarse
❯ 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)
nothing to hide
I'm running the Azul ARM JVM
Instaled through Zulu, trying to change java version
Anybody else experiencing problems using Kaocha with the latest Clojurescript?
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 "java.io.BufferedReader@6736791a"], :out #object[java.io.BufferedWriter 0x1d868003 "java.io.BufferedWriter@1d868003"]}}], :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 "java.io.BufferedReader@6736791a"], :out #object[java.io.BufferedWriter 0x1d868003 "java.io.BufferedWriter@1d868003"]}}], :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
❯
Downgrading kaocha-cljs to 0.0-68 made it work. So the combination kaocha-cljs 0. 0-71 and clojurescript 1.10.844 seems to be problematic
ah! probably https://github.com/lambdaisland/glogi/issues/10
Thanks for reporting that, @schmandle! I can upgrade Kaocha-cljs to use the latest version of Glogi
Please keep us updated as to whether switching to an ARM JVM fixes the issue!
Unfortunately, it did not
java --version
openjdk 15.0.2 2021-01-19
OpenJDK Runtime Environment Zulu15.29+15-CA (build 15.0.2+7)
OpenJDK 64-Bit Server VM Zulu15.29+15-CA (build 15.0.2+7, mixed mode)
this is the version I have not, does not seem to work
It must be something deeper, I'm afraid. I don't have the experience you are having. I develop also on a M1 mini.
Great. Thanks!