lambdaisland / lambdaisland/kaocha-cljs

kaocha-cljs fails with ClojureScript 1.12.134

Open
#57 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
47
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Running bin/kaocha in a ClojureScript project using cljs 1.12.134 fail with an the following error:

ERROR in unit-cljs (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 (Error) at (<cljs repl>:1).\nAssert failed: (or (js-fn? tag) (and (implements? INamed tag) (namespace tag)))\n", :data {:type :js-eval-exception, :error {:status :exception, :value "Execution error (Error) at (<cljs repl>:1).\nAssert failed: (or (js-fn? tag) (and (implements? INamed tag) (namespace tag)))\n"}, :repl-env #cljs.repl.node.NodeEnv{:host "localhost", :port 55641, :path nil, :socket #object[clojure.lang.Atom 0x24cc4f2a {:status :ready, :val {:socket #object[java.net.Socket 0x61fab063 "Socket[addr=localhost/127.0.0.1,port=55641,localport=43410]"], :in #object[java.io.BufferedReader 0x163f56c "java.io.BufferedReader@163f56c"], :out #object[java.io.BufferedWriter 0x2595ecb2 "java.io.BufferedWriter@2595ecb2"]}}], :proc #object[clojure.lang.Atom 0x63e64235 {:status :ready, :val #object[java.lang.ProcessImpl 0x57ab8f82 "Process[pid=559656, exitValue=137]"]}], :state #object[clojure.lang.Atom 0x49fdc88e {: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" 582]}], :trace [[cljs.repl$evaluate_form invokeStatic "repl.cljc" 582] [cljs.repl$evaluate_form invoke "repl.cljc" 503] [cljs.repl$eval_cljs invokeStatic "repl.cljc" 699] [cljs.repl$eval_cljs invoke "repl.cljc" 692] [kaocha.cljs.queue_eval_loop$start_BANG_$fn__3793$fn__3798 invoke "queue_eval_loop.clj" 78] [kaocha.cljs.queue_eval_loop$start_BANG_$fn__3793 invoke "queue_eval_loop.clj" 69] [cljs.compiler$with_core_cljs invokeStatic "compiler.cljc" 1535] [cljs.compiler$with_core_cljs invoke "compiler.cljc" 1524] [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" 473] [kaocha.cljs.prepl$prepl$fn__3814$fn__3815 invoke "prepl.clj" 14] [kaocha.cljs.prepl$prepl$fn__3814 invoke "prepl.clj" 13] [clojure.core$binding_conveyor_fn$fn__5844 invoke "core.clj" 2047] [clojure.lang.AFn call "AFn.java" 18] [java.util.concurrent.FutureTask run "FutureTask.java" 328] [java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1090] [java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 614] [java.lang.Thread run "Thread.java" 1474]], :cause "Execution error (Error) at (<cljs repl>:1).\nAssert failed: (or (js-fn? tag) (and (implements? INamed tag) (namespace tag)))\n", :data {:type :js-eval-exception, :error {:status :exception, :value "Execution error (Error) at (<cljs repl>:1).\nAssert failed: (or (js-fn? tag) (and (implements? INamed tag) (namespace tag)))\n"}, :repl-env #cljs.repl.node.NodeEnv{:host "localhost", :port 55641, :path nil, :socket #object[clojure.lang.Atom 0x24cc4f2a {:status :ready, :val {:socket #object[java.net.Socket 0x61fab063 "Socket[addr=localhost/127.0.0.1,port=55641,localport=43410]"], :in #object[java.io.BufferedReader 0x163f56c "java.io.BufferedReader@163f56c"], :out #object[java.io.BufferedWriter 0x2595ecb2 "java.io.BufferedWriter@2595ecb2"]}}], :proc #object[clojure.lang.Atom 0x63e64235 {:status :ready, :val #object[java.lang.ProcessImpl 0x57ab8f82 "Process[pid=559656, exitValue=137]"]}], :state #object[clojure.lang.Atom 0x49fdc88e {: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$eval8009$fn__8011$fn__8016.invoke (cljs.clj:269)
    kaocha.type.cljs$queue_consumer.invokeStatic (cljs.clj:197)
    kaocha.type.cljs$queue_consumer.invoke (cljs.clj:182)
    kaocha.type.cljs$eval8009$fn__8011.invoke (cljs.clj:264)
    ...
    kaocha.plugin.capture_output$capture_output_wrap_run_hook$fn__2249$fn__2250.invoke (capture_output.cljc:88)
    ...
    kaocha.plugin.capture_output$capture_output_wrap_run_hook$fn__2249.doInvoke (capture_output.cljc:88)
    ...
    kaocha.testable$run.invokeStatic (testable.clj:129)
    kaocha.testable$run.invoke (testable.clj:120)
    kaocha.testable$run_testable.invokeStatic (testable.clj:211)
    kaocha.testable$run_testable.invoke (testable.clj:158)
    kaocha.testable$run_testables.invokeStatic (testable.clj:224)
    kaocha.testable$run_testables.invoke (testable.clj:214)
    kaocha.api$run$fn__3281$fn__3285$fn__3286.invoke (api.clj:159)
    ...
    kaocha.api$run$fn__3281$fn__3285.invoke (api.clj:133)
    ...
    kaocha.api$run$fn__3281.invoke (api.clj:132)
    ...
    kaocha.api$run.invokeStatic (api.clj:110)
    kaocha.api$run.invoke (api.clj:97)
    kaocha.runner$run$fn__3344.invoke (runner.clj:131)
    ...
    kaocha.runner$run.invokeStatic (runner.clj:129)
    kaocha.runner$run.invoke (runner.clj:72)
    kaocha.runner$_main_STAR_.invokeStatic (runner.clj:165)
    kaocha.runner$_main_STAR_.doInvoke (runner.clj:143)
    ...
    kaocha.runner$_main.invokeStatic (runner.clj:176)
    kaocha.runner$_main.doInvoke (runner.clj:174)
    ...
0 tests, 1 assertions, 1 errors, 0 failures.

Rolling back to the previous cljs release, 1.12.116, fixes the problem. I have reproduced this problem in a minimal project with no other dependencies:

{:paths   ["src" "test"]
 :deps    {org.clojure/clojure       {:mvn/version "1.12.4"}
           org.clojure/clojurescript {:mvn/version "1.12.116"}}
 :aliases {:test {:extra-deps {com.lambdaisland/kaocha-cljs {:mvn/version "1.8.163"}
                               lambdaisland/kaocha          {:mvn/version "1.91.1392"}}}}}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running bin/kaocha in the minimal project with ClojureScript 1.12.134, then compare with 1.12.116. Trace loading of kaocha.cljs.websocket-client and kaocha.cljs.run around the reported assertion; done means the minimal project runs its ClojureScript tests successfully with 1.12.134.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.