Fork me on GitHub
#shadow-cljs
<
2022-02-22
>
orestis16:02:23

I seem to have trouble loading shadow-cljs 2.17.x - it complains at load time and points to potential dependency clashes, but I can't see anything out of the ordinary.

thheller16:02:37

well what happens?

thheller16:02:13

that is indeed a dependency conflict

thheller16:02:19

guava to be exact

orestis17:02:00

Is shadow-cljs using guava then? Clojure -Stree doesn't think so...

thheller17:02:18

shadow-cljs is not. the closure compiler is.

thheller17:02:42

they changed how they bundle stuff so the closure compiler doesn't declare the guava dependency correctly anymore or something

thheller17:02:47

but it is still used and required

thheller17:02:06

I generally strongly recommend keeping your CLJS and CLJ dependencies separate for this reason

orestis17:02:39

Bah. We depend on having them together.

thheller17:02:57

I don't even know which guava version it wants anymore

orestis17:02:42

In the sense that some of our cljs macros depend on our Clojure code. So naturally we had everything under one JVM. Would you suggest to use two different JVMs for this? Then I guess we could at least minimize the blast radius.

thheller17:02:38

one jvm is fine if you are willing to sort out your dependency conflicts

thheller17:02:54

two usually avoids them completely and is easier to maintain in some sense

thheller17:02:42

its usually not that hard to sort out the conflicts. just an exclude or two

thheller17:02:59

or just manually depend on whatever the current guava version is

thheller17:02:12

datomic or whatever is using guava is usually fine with a newer version

thheller17:02:21

the closure compiler just isn't fine with an old version

orestis17:02:36

Hm I will use https://github.com/google/closure-compiler#guava-libraries as a reference version and report back.

orestis17:02:00

They say 31.0.1

orestis05:02:51

Pinning 31.0.1 at the top level works. I was using 30.0 brought by some dependency. Annoying.

alex21:02:38

We have an app that uses lazy module-loading, deployed to users for the very first time this past Friday w/ shadow-cljs 2.17.2 (thanks thheller for the help and documentation!). Deploy went well and without issue! Today we deployed a new version of the app, which included an upgrade to shadow-cljs 2.17.4 . Otherwise we made no changes to the build/compilation process. After the deploy, some users experienced the app crashing; in most scenarios, refreshing the app in-browser fixed things. In looking through our logs, it seemed like some of bundled modules were unable to be loaded. Multiple errors with

Error loading <module>: Consecutive load failures
Looking at the recent commits on https://github.com/thheller/shadow-cljs/commits/master, it seems there were some changes to the Google Module loader. Would those changes have potentially caused breakage for modules built on 2.17.2 vs. modules built on 2.17.4 ? Also Clojars has 2.17.4, but that version isn't reflected anywhere in the Github repo. Curious to know what's the best way to compare 2 versions via Github to check the diff of commits. Thanks!