Closed nfedyashev closed 4 years ago
Hmm, not sure why it ends up in a compile loop for you. I'm not able to reproduce this locally.
I did notice an issue with the version of Google closure lib being used, I just pushed out an update maybe that will help.
@yogthos I did some more research and it looks like not only my local setup is affected.
Reproducing the same issue locally:
lein new luminus app2 +cljs +shadow-cljs
lein shadow watch app
lein-shadow - running: npm --version
lein-shadow - NPM version 6.14.4
lein-shadow - running: npm install --save-dev --save-exact xmlhttprequest@1.8.0
lein-shadow - NPM install successful + xmlhttprequest@1.8.0updated 1 package and audited 1 package in 1.004sfound 0 vulnerabilities
lein-shadow - running shadow-cljs...
2020-07-20 04:42:32,974 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
2020-07-20 04:42:33,647 [main] INFO io.undertow - starting server: Undertow - 2.1.1.Final
2020-07-20 04:42:33,653 [main] INFO org.xnio - XNIO version 3.8.0.Final
2020-07-20 04:42:33,742 [main] INFO org.jboss.threads - JBoss Threads version 3.1.0.Final
2020-07-20 04:42:33,757 [main] DEBUG io.undertow - Configuring listener with protocol HTTP for interface 0.0.0.0 and port 9630
shadow-cljs - server version: 2.10.14 running at http://localhost:9630
shadow-cljs - nREPL server started on port 7002
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (162 files, 0 compiled, 0 warnings, 2.89s)
2020-07-20 04:42:46,236 [XNIO-1 I/O-3] DEBUG i.undertow.websockets.core.extension - Negotiated extension WebSocketExtension{name='permessage-deflate', parameters=[]} for handshake WebSocketExtension{name='permessage-deflate', parameters=[{'client_max_window_bits': 'null'}]}
[:app] Compiling ...
[:app] Build completed. (162 files, 74 compiled, 0 warnings, 5.96s)
[:app] Build completed. (162 files, 75 compiled, 0 warnings, 7.20s)
[:app] Compiling ...
[:app] Build completed. (162 files, 74 compiled, 0 warnings, 3.70s)
[:app] Compiling ...
etc
Just started a fresh VPS - Ubuntu 18.04.3 (LTS) x64 and reproduced the same issue:
sudo apt update
sudo apt install nodejs npm git openjdk-11-jdk-headless leiningen
lein new luminus app2 +cljs +shadow-cljs && cd app2 && lein shadow watch app
(truncated other Retrieving)
Retrieving ring/ring-mock/0.4.0/ring-mock-0.4.0.jar from clojars
Retrieving clj-stacktrace/clj-stacktrace/0.2.8/clj-stacktrace-0.2.8.jar from clojars
2020-07-20 01:53:52,407 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
2020-07-20 01:53:54,229 [main] INFO io.undertow - starting server: Undertow - 2.1.1.Final
2020-07-20 01:53:54,249 [main] INFO org.xnio - XNIO version 3.8.0.Final
2020-07-20 01:53:54,417 [main] INFO org.jboss.threads - JBoss Threads version 3.1.0.Final
2020-07-20 01:53:54,452 [main] DEBUG io.undertow - Configuring listener with protocol HTTP for interface 0.0.0.0 and port 9630
shadow-cljs - server version: 2.10.14 running at http://localhost:9630
shadow-cljs - nREPL server started on port 7002
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (162 files, 161 compiled, 0 warnings, 45.90s)
[:app] Compiling ...
[:app] Build completed. (162 files, 75 compiled, 0 warnings, 22.69s)
[:app] Compiling ...
[:app] Build completed. (162 files, 24 compiled, 0 warnings, 7.37s)
[:app] Compiling ...
My only guess is that there might be a bug in one of the recent dependency updates in luminus template because my other luminus app work just fine(same PC) and it was created ~ 1 month ago.
Thanks for the heads up, I'll try see if I can reproduce locally with a VM. On my mac it looks ok with the same flags:
lein new luminus app2 +cljs +shadow-cljs && cd app2 && lein shadow watch app
Retrieving luminus/lein-template/3.80/lein-template-3.80.pom from clojars
Retrieving luminus/lein-template/3.80/lein-template-3.80.jar from clojars
Generating a Luminus project.
lein-shadow - running: npm --version
lein-shadow - NPM version 6.14.4
lein-shadow - running: npm install --save-dev --save-exact xmlhttprequest@1.8.0
lein-shadow - NPM install successful + xmlhttprequest@1.8.0added 1 package from 1 contributor and audited 1 package in 1.499sfound 0 vulnerabilities
lein-shadow - running shadow-cljs...
2020-07-20 01:01:23,330 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
2020-07-20 01:01:23,899 [main] INFO io.undertow - starting server: Undertow - 2.1.1.Final
2020-07-20 01:01:23,907 [main] INFO org.xnio - XNIO version 3.8.0.Final
2020-07-20 01:01:24,018 [main] INFO org.jboss.threads - JBoss Threads version 3.1.0.Final
2020-07-20 01:01:24,029 [main] DEBUG io.undertow - Configuring listener with protocol HTTP for interface 0.0.0.0 and port 9630
shadow-cljs - server version: 2.10.14 running at http://localhost:9630
shadow-cljs - nREPL server started on port 7002
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (162 files, 161 compiled, 0 warnings, 7.98s)
might be worth checking on Slack as well to see if anybody managed to get shadow-cljs into a looping state.
@yogthos Slack was very helpful :) Just sent a PR to fix it
👍
A new app generated via
lein run
works fine but shadow watching goes into infinite loop:What might be causing it? Haven't seen this before with luminus apps generated ~ month ago.
Let me know if you need any additional context info