Fork me on GitHub
#shadow-cljs
<
2021-05-17
>
zimablue08:05:07

Hi, I'm using shadow-cljs version 2.12.7 with config like this :node {:target :node-library :compiler-options {:infer-externs :auto} :devtools {:repl-timeout 100000}

zimablue08:05:27

and getting timeout errors still, the timeout seems to be ignored

thheller08:05:50

what timeouts are you talking about?

thheller08:05:28

:repl-timeout only controls how long shadow will wait for an result of a repl evaluation

zimablue08:05:36

ah, It's a timeout when I'm in node-repl and I run an import statement

zimablue08:05:40

it's intermittent

zimablue08:05:48

sorry by import I mean require

thheller08:05:53

I'm totally in the dark here. I don't have a clue what you are talking about. Please be more specific.

zimablue08:05:14

I run the command "shadow-cljs node-repl node"

zimablue08:05:23

then I am in a repl, which works fine

thheller08:05:37

ok, first mistake. node-repl is standalone, it is NOT controlled by any build config

zimablue08:05:41

but some statements cause a timeout, which then stops the repl from working any more

zimablue08:05:22

so how can I create a node repl using shadow-cljs which I can configure the timeouts for?

thheller08:05:22

first explain why configuring a timeout is necessary. 30sec default is plenty and should NEVER be encountered in a node repl. Unless you compile a millions lines of CLJS via the require or so

zimablue08:05:07

I don't know why it's necessary, sorry. I just know that it's timing out. I can try to work that out

zimablue08:05:44

just by binary searching the imports to work out which one is heaviest? but it's slightly tough to debug because it only happens 50% of the time

thheller08:05:56

I'm asking WHAT you are doing? Why do you think increasing the timeout is necessary?

thheller08:05:15

I have seen no code or anything so I'm guessing ...

zimablue08:05:18

I'm hacking on datahike, a clojurescript library, and encountering timeout errors. Because it's intermittent and something to do with compiling, working out the precise origin seemed like it would be tough so my first instinct was just to increase the timeout

thheller08:05:54

note that getting a timeout does NOT stop the action from actually running

thheller08:05:42

it'll just cause the REPL to no longer wait and give you another prompt

thheller08:05:30

but yeah you are not providing enough information to offer any kind of suggestion

thheller08:05:50

a REPL for your actual build you get via shadow-cljs cljs-repl node (assuming :node is the build id)

thheller08:05:20

that will then also respect your timeout settings, just need to manage the node process yourself then

zimablue08:05:24

thank you, sorry for the poor information, I think that you have helped me

mauricio.szabo21:05:21

Hi, @thheller. Once, you told me of a parameter that allows me to debug the compilation process of Shadow-CLJS. What's the parameter? The reason is that my hot-reload is taking a looong time, and I want to be able to se what's happening.

thheller07:05:38

hot-reload or compilation? you can get more details for the compilation parts via shadow-cljs watch app --verbose

thheller07:05:45

hot-reload itself doesn't have options

mauricio.szabo13:05:28

All right, I'll try --verbose and see if it helps

mauricio.szabo23:05:36

Also, is there a way to not remove deftest and friends in compilation process? I know I can use another target, but I'm doing some weird things and I want to control how to run specific tests so I'm using a target :node-script 😄

mauricio.szabo23:05:04

(Nevermind the last question: I can use :load-tests true on :compiler-options)