Fork me on GitHub
#shadow-cljs
<
2019-06-04
>
lilactown02:06:27

It looks like Set is only supported in IE11 and above

lilactown02:06:04

You might need a polyfill. I don't think CLJS depends on it; are you using any npm libs that might need it?

👍 4
🙏 4
Nolan03:06:42

i definitely could be. appreciate your input, thats really helpful.

yuhan12:06:48

what's the recommended way of integrating shadow-cljs into an existing clojure+deps.edn project?

yuhan12:06:46

If I add a shadow-cljs.edn file in the project root and use :deps true does this mean the clj and cljs sides are sharing the same dependencies?

thheller12:06:07

@qythium depends on how you want to integrate everything

thheller12:06:31

you could create a :cljs alias or so in deps.edn or you could just keep CLJS deps in shadow-cljs.edn

thheller12:06:47

the recommended workflow is to just keep things separate

thheller12:06:00

CLJS doesn't gain anything by being integrated into a CLJ project

thheller12:06:19

you can however just integrate it like any other library

yuhan12:06:35

keeping it separate sounds good, so that means I'll have to have 2 JVM processes running in development? One for my existing clj project and the other running Shadow and the cljs repl

thheller12:06:58

yeah thats what I do typically

thheller12:06:31

most people seem to opt for the embedded version however so you only have one JVM running

thheller12:06:43

but that often means fighting with dependencies a bit more

thheller12:06:39

:deps {:aliases [:cljs]} and a :cljs alias in deps.edn is OK if you want to keep all dependencies in one place

thheller12:06:06

its fine to embed really, you don't lose any features. just can get a bit annoying when fighting dependency conflicts

yuhan12:06:41

ah, so that's what happens when I "connect-clj&cljs" in Cider?

yuhan12:06:44

does not embedding mean having 2 separate nREPL ports to connect to?

thheller12:06:47

if you use emacs it is probably best to go with the embedded route

thheller12:06:20

in Cursive it sort of doesn't matter since it doesn't rely on nrepl as mcuh

yuhan12:06:16

got it, thanks! I'll try it both ways and see :)

yuhan13:06:31

Looks like there's some sort of dependency issue with the [dali "0.7.4"] library, including it in the dependencies causes the error

Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/dom/ls/DocumentLS
 at java.base/java.lang.ClassLoader.defineClass1(Native Method)
 at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
 at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
 at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)
 at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)
 at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
 at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
 at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
 at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
 at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
 at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
 at shadow.build.classpath$pom_info_for_jar.invokeStatic(classpath.clj:355)
 at shadow.build.classpath$pom_info_for_jar.invoke(classpath.clj:346)
 at shadow.build.classpath$find_jar_resources_STAR_.invokeStatic(classpath.clj:439)
 at shadow.build.classpath$find_jar_resources_STAR_.invoke(classpath.clj:427)
 at shadow.build.classpath$find_jar_resources.invokeStatic(classpath.clj:554)
 at shadow.build.classpath$find_jar_resources.invoke(classpath.clj:528)
 at shadow.build.classpath$find_resources.invokeStatic(classpath.clj:608)
 at shadow.build.classpath$find_resources.invoke(classpath.clj:600)
 at shadow.build.classpath$index_path_STAR_.invokeStatic(classpath.clj:839)
 at shadow.build.classpath$index_path_STAR_.invoke(classpath.clj:836)
 at clojure.lang.PersistentVector.reduce(PersistentVector.java:343)
....

yuhan13:06:12

any idea how I should go about resolving this?

yuhan13:06:18

oh, so I have to manually add those excluded deps?

yuhan13:06:03

trying that out now-

thheller13:06:05

might fix it but I'm not sure which package that class is from

yuhan13:06:36

that was it, adding xerces/xercesImpl {:mvn/version "2.12.0"} to the deps list fixed the startup - although I haven't tried using the library

yuhan13:06:10

I don't think it's specifically a tools.deps issue though, created an empty shadow-cljs project with only a single dependency on dali and the error still came up

exit221:06:08

Hello, I’m trying to move a figwheel project to shadow and I’m seeing this error around requiring macros

exit221:06:14

Error in phase :compile-syntax-check
FileNotFoundException: Could not locate clojure/core/match__init.class, clojure/core/match.clj or clojure/core/match.cljc on classpath.

thheller21:06:16

core.match not on the classpath?

thheller21:06:54

check if core.match is in your deps.edn?

exit221:06:48

Ah yes thats it, thanks!

exit223:06:55

I can’t seem to match my ns correctly for my repl, I’m trying to call a (start) fn which is in my source paths, but I’m unable to resolve the symbol

exit223:06:57

{:source-paths ["dev/server" "src/client"]
 :deps   {:aliases [:dev]}
 :nrepl  {:port 9000}
 :builds {:main {:target     :browser
                 :output-dir "resources/public/generated/js/dev"
                 :asset-path "/generated/js/dev"

                 :modules {:main {:entries [admin.core]}}

                 :devtools {:http-port  3000
                            :preloads   [devtools.preload
                                         fulcro.inspect.preload]}}}}

lilactown23:06:44

how are you trying to call it?