Fork me on GitHub
#shadow-cljs
<
2019-04-23
>
henrik07:04:06

Has anyone seen these errors before?

[2019-04-23 11:34:14.200 - INFO] :shadow.build.classpath/jar-cache-write-ex - {:file #object[java.io.File 0x31ab3dc7 ".shadow-cljs/jar-manifest/1555996365252-java-io-0.1.13.jar.manifest"]}
NoSuchMethodError com.cognitect.transit.TransitFactory.writer(Lcom/cognitect/transit/TransitFactory$Format;Ljava/io/OutputStream;Ljava/util/Map;Lcom/cognitect/transit/WriteHandler;Ljava/util/function/Function;)Lcom/cognitect/transit/Writer;
	cognitect.transit/writer (transit.clj:157)
	cognitect.transit/writer (transit.clj:139)
	shadow.build.cache/write-stream (cache.clj:9)
	shadow.build.cache/write-stream (cache.clj:8)
	shadow.build.cache/write-file (cache.clj:26)
	shadow.build.cache/write-file (cache.clj:24)
	shadow.build.classpath/find-jar-resources/fn--10810 (classpath.clj:558)
	shadow.build.classpath/find-jar-resources (classpath.clj:557)
	shadow.build.classpath/find-jar-resources (classpath.clj:528)
	shadow.build.classpath/find-resources (classpath.clj:608)
	shadow.build.classpath/find-resources (classpath.clj:600)
	shadow.build.classpath/index-path* (classpath.clj:839)
Tons and tons of them. Probably one for every dep I have.

henrik07:04:33

Shadow-cljs 2.8.33

thheller07:04:38

@henrik do you use :lein or :deps in shadow-cljs.edn? look like there maybe a dependency conflict on the transit dep?

henrik08:04:28

Transit is pulled in transitively from cljs-http and datomic-cloud respectively.

souenzzo13:04:11

In my datomic cloud I use

{:aliases {:cljs {:override-deps {com.google.guava/guava     {:mvn/version "27.1-jre"}
                                  org.clojure/tools.reader   {:mvn/version "1.3.2"}
                                  org.clojure/core.async     {:mvn/version "0.4.490"}
                                  com.cognitect/transit-java {:mvn/version "0.8.337"}}
                  :extra-paths   ["src/app" "src/web"]
                  :extra-deps    {thheller/shadow-cljs                            {:mvn/version "2.8.32"}
                                  com.google.javascript/closure-compiler-unshaded {:mvn/version "v20190325"}
                                  ch.qos.logback/logback-classic                  {:mvn/version "1.3.0-alpha4"}
                                  org.clojure/google-closure-library              {:mvn/version "0.0-20190213-2033d5d9"}
                                  org.clojure/clojurescript                       {:mvn/version "1.10.520"}}
                  :main-opts     ["-m" "shadow.cljs.devtools.cli"]}}}

henrik08:04:43

I'll have a look, thanks

thheller08:04:13

should be using [com.cognitect/transit-clj "0.8.313"]

henrik08:04:30

datomic-cloud uses 0.8.2xx. I have no idea why, but it tends to rely on old libs.

souenzzo13:04:11

In my datomic cloud I use

{:aliases {:cljs {:override-deps {com.google.guava/guava     {:mvn/version "27.1-jre"}
                                  org.clojure/tools.reader   {:mvn/version "1.3.2"}
                                  org.clojure/core.async     {:mvn/version "0.4.490"}
                                  com.cognitect/transit-java {:mvn/version "0.8.337"}}
                  :extra-paths   ["src/app" "src/web"]
                  :extra-deps    {thheller/shadow-cljs                            {:mvn/version "2.8.32"}
                                  com.google.javascript/closure-compiler-unshaded {:mvn/version "v20190325"}
                                  ch.qos.logback/logback-classic                  {:mvn/version "1.3.0-alpha4"}
                                  org.clojure/google-closure-library              {:mvn/version "0.0-20190213-2033d5d9"}
                                  org.clojure/clojurescript                       {:mvn/version "1.10.520"}}
                  :main-opts     ["-m" "shadow.cljs.devtools.cli"]}}}

Francesco14:04:56

hello, is shadow-cljs providing any util in order to inject generated bundles/scripts in the html when using :module-hash-names?

souenzzo15:04:46

shadow outputs manifest.edn next to main-<sha>.js You can use it do get the names

lilactown15:04:25

thheller, awhile ago you said that the dependency graph for namespaces is there; is there any way I could get at it?

thheller17:04:43

@lilactown (-> (shadow/get-config :the-build) (shadow/compile* {}) (:shadow.build/info))

thheller17:04:24

contains a :sources vector which has what they provided and required

thheller17:04:42

you can build the graph from that

lilactown18:04:07

😄 thanks! I'll try it out sometime soon