Fork me on GitHub
#shadow-cljs
<
2019-08-27
>
manuel06:08:26

@thheller just want to say "thank you!" for the hot-reloading capabilities. Amazing stuff as usual.

πŸ‘ 16
iku00088807:08:46

My chromium browser gives up loading the js files from the dev-http server(after about 2 seconds) saying the parser is blocked because of document.write(). Has anyone seen this happen? shadow-cljs version is 2.8.51 and works fine on firefox 😭

thheller07:08:41

seems like a lot of people seem to run into issues lately

iku00088807:08:21

Wow that was fast! Will give it a spin. Thanks πŸ˜‰

iku00088807:08:07

Darn it works like a charm ❀️ Thanks!

Ivan Fedorov09:08:08

Hello, fellas! Do you have any friendship recipes for building cljs via lein shadow release app? Found this https://gitlab.com/nikperic/lein-shadow But it fails on a call to Closure.

Exception in thread "main" Syntax error compiling . at (shadow/build/closure.clj:68:5).
...
Caused by: java.lang.NoSuchFieldException: getRegisteredGroups
        at java.base/java.lang.Class.getField(Class.java:1958)

Ivan Fedorov09:08:23

Same if I run lein run -m shadow.cljs.devtools.cli compile app

thheller09:08:53

@ognivo that is caused by a dependency conflict. try adding

[com.google.javascript/closure-compiler-unshaded "v20190819"]
   [org.clojure/google-closure-library "0.0-20190213-2033d5d9"]
to your deps

superstructor03:08:21

Just a note, I find it better to exclude these deps from clojurescript which then allows the versions to be pulled in from the shadow-cljs dependency. So then shadow-cljs controlls the versions of these. E.g. https://github.com/Day8/re-frame/blob/master/project.clj#L6 @ognivo @thheller

Ivan Fedorov09:08:03

Yes, I should start to do this. Thanks!

thheller09:08:02

and probably also [org.clojure/clojurescript "1.10.520]

thheller09:08:16

or just don't lein πŸ˜‰

Ivan Fedorov09:08:21

Personally, I don’t lein, but this time I do it for the boys πŸ˜‰

thedavidmeister10:08:12

any idea why the repl would not be showing any console logs

thedavidmeister10:08:29

i'm doing node repl-node/main.js

thedavidmeister10:08:42

shadow-cljs watch app

thedavidmeister10:08:54

shadow-cljs cljs-repl app

thheller10:08:34

explain "console logs"?

thedavidmeister10:08:23

prn and (.log js/console ...)

thheller10:08:10

js/console logs will show in the output of the actual node process. so node repl-node/main.js

thheller10:08:39

prn can only be captured partially so will most likely also only show up there

thedavidmeister10:08:08

ok, actually it does work

thedavidmeister10:08:13

i think my actual problem is promises

thedavidmeister10:08:56

any reason why a .then wouldn't complete and/or be able to log from inside the callback?

thheller10:08:17

well therein lies the problem. the async nature of JS doesn't play well with bindings

thheller10:08:27

so it is hard to capture async output

thheller10:08:42

the node process should still show the output though

thedavidmeister10:08:49

that makes more sense than prn randomly not working

thedavidmeister10:08:49

ok, nm i found the issue

thedavidmeister10:08:32

seems my API auth randomly stopped working so .then wasn't happening, it's .catch now >.<

Ivan Fedorov11:08:08

This helped with my exception.

[com.google.javascript/closure-compiler-unshaded "v20190819"]
   [org.clojure/google-closure-library "0.0-20190213-2033d5d9"]
Thank you Mr Heller!

felipethome19:08:39

Hi! When the target is :karma adding :loader-mode :eval is useful?

thheller19:08:41

probably not

felipethome19:08:55

Is there a chance that Chrome headless can suffer from ERR_INSUFFICIENT_RESOURCES and the browser would hang forever, reach the Karma timeouts and then fail the tests?

thheller19:08:54

no. karma doesn't load separate files. it is just one big file

πŸ‘ 4