Fork me on GitHub
#figwheel-main
<
2018-09-28
>
bhauman12:09:54

@jstaab just for clarification, figwheel reloads what its watching including Clojure files

bhauman12:09:27

this will not of course restart your server to pick up changes in ring handlers etc.

bhauman12:09:32

but you can use var references (i.e #'my-handler) instead of direct references to achieve a good reloading workflow, without having to setup a reloaded workflow with integrant or component

bhauman12:09:21

so if you add a directory with Clojure code that you want reloaded to :watch-dirs the code will be reloaded on file change

tmarble17:09:31

@bhauman is there any way to turn on extra debugging when running tests? I'm so so close to being able to switch the project over to figwheel-main. When I run tests locally they run fine. When I run in CircleCI (inside a container running Ubuntu) they timeout (with "Eval timed out!") The log shows [0928/172324.990490:INFO:(399)] Type a Javascript expression to evaluate or "quit" to exit. So it seems that chromium-browser is running...???

tmarble17:09:00

I know that the stream handling (STDIN/STDOUT) with the browser is delicate... Just thinking of it's possible insert something like "tee" to log the detailed conversation with the browser?

shaun-mahood17:09:03

Does https://figwheel.org/config-options#client-log-level do anything to change the error messages that come back from CircleCI?

tmarble17:09:47

oooh let me try that!

tmarble17:09:03

@shaun-mahood i assume that should be in the metadata map in my test.cljs.edn ?

shaun-mahood17:09:56

yeah I think so - same as any other figwheel specific option

tmarble18:09:15

Running again on CircleCI right now.. There is more debugging in the terminal (which may be helpful), but the log of the browser session is the same.

shaun-mahood18:09:28

Can you get it to do anything like console.log? I've never done any headless work so now I'm just pretending to have ideas 🙂

tmarble18:09:35

It seems like it doesn't actually start testing

tmarble18:09:59

the tricky bit is .. this is what you see on STDOUT before the tests run Environment output being logged to: target/public/cljs-out/test/js-environment.log in either the happy case -or- or the case when it eventually times out

tmarble18:09:45

hmm interesting.. I set the arg to run-tests-async to 900000 (which is 15 minutes), but it timed out after 3 minutes!!

tmarble18:09:05

it seems like if I set :repl-eval-timeout to a higher-than-default value the tests complete (as if it uses that default instead the arg to run-tests-async

tmarble19:09:16

yay! CircleCI passed! My theory is that there is a figwheel-repl connection to the browser (chromium --headless --repl) and that's why :repl-eval-timeout is important The 8 second default https://github.com/bhauman/figwheel-repl/blob/master/src/figwheel/repl.cljc#L1041 is enough on a dev workstation, but not quite enough in CircleCI... so increasing it allows the browser repl connection to get established so the tests can be run.

shaun-mahood19:09:14

I wonder if there's a good place for something about that on https://figwheel.org/docs/testing.html

tmarble19:09:13

perhaps.. let's see if Bruce thinks my explanation is plausible

👍 4