yada

Danny Almeida 2020-04-01T01:16:06.026400Z

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: <http://java.io|java.io>.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 ?

mccraigmccraig 2020-04-01T07:52:19.030Z

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 Almeida 2020-04-01T08:09:38.037300Z

@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.

dominicm 2020-04-01T08:13:23.040Z

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

mccraigmccraig 2020-04-01T08:13:53.040400Z

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

dominicm 2020-04-01T08:16:15.040700Z

clj -Stree

Akshay C. Gollapalli 2020-04-01T19:17:23.042400Z

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.

dominicm 2020-04-01T20:02:24.042800Z

I have an example of this

Akshay C. Gollapalli 2020-04-01T20:52:55.043300Z

Thanks!