Fork me on GitHub
#kaocha
<
2020-01-15
>
plexus07:01:59

I know nothing about github actions... Can you verify that the node executable is available?

delaguardo08:01:18

Yes, it is available. But actually this is not only about gh actions. I'm having the same problem on my local machine.

miikka08:01:13

metosin/sieppari runs cljs tests in github actions like this: https://github.com/metosin/sieppari/blob/develop/.github/workflows/main.yml

miikka08:01:38

there haven't been too many commits to sieppari so I wouldn't say that it's heavily tested but at least it passed the last couple of times it was used 😛

delaguardo08:01:37

more or less how I’m trying to do except instead of leiningen I’m using tools-deps

delaguardo08:01:01

Let me prepare minimal reproducible repo

delaguardo09:01:53

there are two problems: • clojurescript tests runner got stuck and will be killed by GH action • locally I can get exception: “Exception: clojure.lang.ExceptionInfo: Kaocha ClojureScript client failed connecting back.”

plexus09:01:57

> locally I can get exception: “Exception: clojure.lang.ExceptionInfo: Kaocha ClojureScript client failed connecting back.” This is a generic error which means something went wrong on the cljs repl side.

delaguardo10:01:47

how can I debug this?

delaguardo10:01:06

I found debug section in README. will give it a try

plexus10:01:19

there's some info in the kaocha-cljs README about getting more debugging information, this may yield some useful information, but likely it won't. the truth is that the node repl-env provides very little help when things go wrong. e.g. if node outputs an error message before the repl is fully initialized then that just gets swallowed.

delaguardo10:01:57

this is something:

Compile sources, elapsed time: 68.163645 msecs
[goog.require could not find: kaocha_cljs_problem.core

ReferenceError: cljs is not defined
    at Socket.<anonymous> ([stdin]:89:28)
    at Socket.emit (events.js:209:13)
    at Socket.emit (domain.js:476:20)
    at addChunk (_stream_readable.js:305:12)
    at readableAddChunk (_stream_readable.js:282:13)
    at Socket.push (_stream_readable.js:220:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
    at Domain.<anonymous> ([stdin]:50:21)
    at Domain.emit (events.js:209:13)
    at Domain.emit (domain.js:476:20)

plexus10:01:57

it is... I would have to poke at the node repl-env implementation to even begin to get an idea of where that could be coming from

plexus10:01:08

sorry, I don't have a ton of bandwidth for this right now, but I'm happy to answer questions if you want to continue to dig into it. Kaocha relies on the cljs repl abstraction, and these have turned out to be hard to troubleshoot when things go wrong, and we might have to either reconsider our approach in the future, or take ownership of these repl-env implementations (i.e. fork them) to provide better instrumentation

delaguardo10:01:14

no worries, I will try to investigate more

delaguardo10:01:40

[#:cljs{:compiler-options {:output-dir out, :closure-warnings {:check-types :off, :check-variables :off}, :closure-defines {kaocha.type.cljs.log_level DEBUG, kaocha.type.cljs.root_log_level DEBUG, cljs.core._STAR_target_STAR_ nodejs}, :ups-libs nil, :cache-analysis true, :closure-module-roots [], :optimizations :none, :ups-foreign-libs [], :aot-cache false, :ignore-js-module-exts [.css], :preamble [cljs/imul.js], :ups-externs nil, :opts-cache cljsc_opts.edn, :source-map true, :cache-analysis-format :transit, :target :nodejs, :emit-constants nil}}
EVAL:  (require (quote kaocha.cljs.websocket-client) (quote kaocha.cljs.run))
EVAL:  ((fn wait-for-websocket-client [] (if (exists? kaocha.cljs.websocket-client) (kaocha.cljs.websocket-client/connect! 57105) (js/setTimeout wait-for-websocket-client 50))))
EVAL:  :require-websocket-client-done8287
:cljs/err -> {:val "WARNING: Use of undeclared Var goog.debug.LogBuffer/CAPACITY at line 45 .cljs_node_repl/lambdaisland/glogi/console.cljs\n", :type :cljs/err}
WARNING: Use of undeclared Var goog.debug.LogBuffer/CAPACITY at line 45 .cljs_node_repl/lambdaisland/glogi/console.cljs

:cljs/err -> {:val "TypeError: Cannot read property 'error__GT_str' of undefined\n    at Socket.<anonymous> ([stdin]:89:28)\n    at Socket.emit (events.js:209:13)\n    at Socket.emit (domain.js:476:20)\n    at addChunk (_stream_readable.js:305:12)\n    at readableAddChunk (_stream_readable.js:282:13)\n    at Socket.push (_stream_readable.js:220:10)\n    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)\n    at Domain.<anonymous> ([stdin]:50:21)\n    at Domain.emit (events.js:209:13)\n    at Domain.emit (domain.js:476:20)\n", :type :cljs/err}
TypeError: Cannot read property 'error__GT_str' of undefined
    at Socket.<anonymous> ([stdin]:89:28)
    at Socket.emit (events.js:209:13)
    at Socket.emit (domain.js:476:20)
    at addChunk (_stream_readable.js:305:12)
    at readableAddChunk (_stream_readable.js:282:13)
    at Socket.push (_stream_readable.js:220:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
    at Domain.<anonymous> ([stdin]:50:21)
    at Domain.emit (events.js:209:13)
    at Domain.emit (domain.js:476:20)

EVAL:  :cljs/quit
E]
More errors) 1. Looks like client did not try to exit when :cljs/quit evaluated 2. “Cannot read property ‘error__GT_str’” this looks like main problem, but I’m not sure where does it comming from

plexus10:01:20

ok, I need to investigate this. @s_zharinov pointed out something similar. I wonder if it's a regression in a recent release, or if it has to do with the clojurescript version

delaguardo11:01:01

quick investigation gives me that with clojurescript “1.10.520” :cljs/quit shuts down main process. “1.10.597" runs forever even when :cljs/quit fired

👀 4
delaguardo11:01:44

also extra warning appears in logs:

:cljs/err -> {:val "WARNING: Use of undeclared Var goog.debug.LogBuffer/CAPACITY at line 45 .cljs_node_repl/lambdaisland/glogi/console.cljs\n", :type :cljs/err}
WARNING: Use of undeclared Var goog.debug.LogBuffer/CAPACITY at line 45 .cljs_node_repl/lambdaisland/glogi/console.cljs