Fork me on GitHub
#yada
<
2020-04-01
>
Danny Almeida01:04:06

I'm getting compilation error with yada version 1.4.0-alpha1 when I add thheller/shadow-cljs as a dependency to the project. Here's the error message

Caused by: .FileNotFoundException: Could not locate clj_time/coerce__init.class, clj_time/coerce.clj or clj_time/coerce.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
        at clojure.lang.RT.load(RT.java:466)
        at clojure.lang.RT.load(RT.java:428)
        at clojure.core$load$fn__6824.invoke(core.clj:6126)
        at clojure.core$load.invokeStatic(core.clj:6125)
        at clojure.core$load.doInvoke(core.clj:6109)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invokeStatic(core.clj:5908)
        at clojure.core$load_one.invoke(core.clj:5903)
        at clojure.core$load_lib$fn__6765.invoke(core.clj:5948)
        at clojure.core$load_lib.invokeStatic(core.clj:5947)
        at clojure.core$load_lib.doInvoke(core.clj:5928)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invokeStatic(core.clj:667)
        at clojure.core$load_libs.invokeStatic(core.clj:5985)
        at clojure.core$load_libs.doInvoke(core.clj:5969)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invokeStatic(core.clj:667)
        at clojure.core$require.invokeStatic(core.clj:6007)
        at clojure.core$require.doInvoke(core.clj:6007)
        at clojure.lang.RestFn.invoke(RestFn.java:551)
        at yada.cookies$eval26143$loading__6706__auto____26144.invoke(cookies.clj:3)
        at yada.cookies$eval26143.invokeStatic(cookies.clj:3)
        at yada.cookies$eval26143.invoke(cookies.clj:3)
        at clojure.lang.Compiler.eval(Compiler.java:7176)
        at clojure.lang.Compiler.eval(Compiler.java:7165)
        at clojure.lang.Compiler.load(Compiler.java:7635)
        ... 90 more
It's from cookies.clj requiring [clj-time.coerce :as time], but I'm not sure why that should result in error. Without this dependency everything works fine. Also, If I switch to yada version 1.2.15, the compilation error goes away. Does anyone have a clue how to resolve this ?

mccraigmccraig07:04:19

my first guess is you have a transitive dependency clash @dionysius.almeida - i.e. "jar hell". look at the deps of your project both with and without shadow to see if you can figure out more

Danny Almeida08:04:38

@mccraigmccraig Without shadow-cljs dependency, it works fine as mentioned in my message. But for some reason when I included shadow-cljs as a dependency, this error propped up. I created project.clj and tried lein, but got same error...wanted to make sure that this was not tools.deps related issue. Then I added clj-time as a dependency and that fixed the error - checked using both lein and tools.deps. Is there a way to find these kinds of dependency issues and fix them ? I'm new to this and clojure error stack messages don't help much.

dominicm08:04:23

Just to check, were you only requiring yada to get this exception? What code gives you this exception?

mccraigmccraig08:04:53

if you are using lein, then lein deps :tree will show you all the transitive dependencies your project is using. i don't know what the tools.depsequivalent is

Akshay C. Gollapalli19:04:23

This is probably a dumb question with a simple answer, but I'm still a bit new to this. How do I set a service written with Yada up to run using HTTPS? Where do I put my certs? Do just create a server with port 443, and then put the cert somewhere specific on the machine? I can't find anything in the docs on the subject.

dominicm20:04:24

I have an example of this