shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
2021-04-02T13:13:53.308900Z

Hi, during the compilation on our project, the compiler hangs, seemingly on a deadlock situation. We suspect that it may be related to a namespace dependency cycle. Is it plausible or not?

thheller 2021-04-02T14:06:57.309400Z

unlikely. dependency cycles are detected in the resolve stage before it gets to compilation

thheller 2021-04-02T14:07:43.309800Z

most common problem is a macro expanding endlessly

thheller 2021-04-02T14:09:53.310400Z

the compiler should self-terminate if it makes no progress for 60seconds

2021-04-02T14:10:32.311100Z

That's what happen, it terminates after some time and namespaces say which other ones they were waiting for.

thheller 2021-04-02T14:11:33.311300Z

the check what that namespace does

👍 1
2021-04-03T21:51:12.337500Z

@thheller I found the problem which caused Shadow-CLJS to hang, and that might interest you:

(ns foo.core
  (:require [bar_baz :as baz])) ;; typo, "_" instead of "-"

2021-04-03T21:52:33.337700Z

Maybe a "_" in a namespace should trigger a warning.

thheller 2021-04-04T08:02:19.339800Z

ah. please open an issue about that so I don't forget.

✅ 1
lispers-anonymous 2021-04-02T14:51:10.314900Z

I keep getting these messages printed into my repl, and can't find much about it searching online

10:47:01.189 [XNIO-1 I/O-1] DEBUG io.undertow.websockets.core.request - UT025003: Decoding WebSocket Frame with opCode 1
The are printed every couple of seconds. Seemingly when ping/pong messages are exchanged over the websocket between shadow and my site in a browser session. Is there any way to hide these? They started showing up recently and I'm unsure what I did to trigger these to appear.

thheller 2021-04-02T14:51:43.315300Z

looks like you are running shadow-cljs in embedded mode? ie. embedded in your CLJ process started from the REPL or so?

lispers-anonymous 2021-04-02T14:53:10.315500Z

Maybe so? I started my repl with cider-jack-in-cljs. Maybe I will have different results if I start shadow in a terminal and connect to that through cider

thheller 2021-04-02T14:55:23.315700Z

if you start it in embedded mode shadow-cljs inherits your jvm logging setup. so you'd configure that logging via your log4j.properties logback.xml or whatever logging you are using

thheller 2021-04-02T14:55:55.315900Z

if you start it separately those logs should not appear

lispers-anonymous 2021-04-02T14:58:48.316100Z

I started my repl with shadow-cljs watch app and connected manually with cider. I still see the messages, both in my terminal and my connected cider repl. We do have a logback.xml in this project. I will try to exclude these logs somehow. Do you happen to know what the logger name would be for these messages?

lispers-anonymous 2021-04-02T14:59:38.316300Z

Trying this <logger name="io.undertow.websockets.core.request" level="WARN" /> first

thheller 2021-04-02T15:02:31.316500Z

I can never remember how to configure this stuff either but logback.xml is the place to do it 🙂

thheller 2021-04-02T15:03:37.316700Z

you can use name="io.undertow" since you likely don't care about any of the messages it outputs. not just that ns.

lispers-anonymous 2021-04-02T15:04:15.316900Z

I will play around with it. I am not the logback guy at my work. Someone will know how to do it though.

lispers-anonymous 2021-04-02T15:04:32.317100Z

Thank you for your help. I really appreciate how responsive you are in this channel.

thheller 2021-04-02T15:06:39.317300Z

happy to help

🙏 1