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}
and getting timeout errors still, the timeout seems to be ignored
what timeouts are you talking about?
:repl-timeout
only controls how long shadow will wait for an result of a repl evaluation
ah, It's a timeout when I'm in node-repl and I run an import statement
it's intermittent
sorry by import I mean require
I'm totally in the dark here. I don't have a clue what you are talking about. Please be more specific.
I'm sorry
I run the command "shadow-cljs node-repl node"
then I am in a repl, which works fine
ok, first mistake. node-repl
is standalone, it is NOT controlled by any build config
but some statements cause a timeout, which then stops the repl from working any more
ah
so how can I create a node repl using shadow-cljs which I can configure the timeouts for?
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
I don't know why it's necessary, sorry. I just know that it's timing out. I can try to work that out
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
I'm asking WHAT you are doing? Why do you think increasing the timeout is necessary?
I have seen no code or anything so I'm guessing ...
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
note that getting a timeout does NOT stop the action from actually running
it'll just cause the REPL to no longer wait and give you another prompt
but yeah you are not providing enough information to offer any kind of suggestion
a REPL for your actual build you get via shadow-cljs cljs-repl node
(assuming :node
is the build id)
that will then also respect your timeout settings, just need to manage the node process yourself then
thank you, sorry for the poor information, I think that you have helped me
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.
hot-reload or compilation? you can get more details for the compilation parts via shadow-cljs watch app --verbose
hot-reload itself doesn't have options
All right, I'll try --verbose
and see if it helps
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
😄
(Nevermind the last question: I can use :load-tests true
on :compiler-options)