Fork me on GitHub
#cljdoc
<
2022-12-22
>
Lucio Assis21:12:58

I can't figure out what's wrong with https://app.circleci.com/pipelines/github/cljdoc/builder/38662/workflows/ea4c1efe-cf3f-476d-a3fa-fec9d5b3f7e6/jobs/55036. It can't find this class com.google.javascript.jscomp.AnonymousFunctionNamingPolicy, which seems to make sense as I couldn't find https://github.com/google/closure-compiler/tree/master/src/com/google/javascript/jscomp. The build started failing when I published the https://github.com/luciolucio/holi/tree/0.12.0, now supporting cljs (https://app.circleci.com/pipelines/github/cljdoc/builder/37827/workflows/fbc422de-0d25-48f6-99d4-2bcce4fc5dc8/jobs/54201 built fine but had no cljs support), but I have no idea why the analyzer fails the way it does.

lread22:12:46

Hi @U028ZNM1S13, I can take a peek for you.

lread22:12:59

One thing that seems odd is that shadow-cljs https://github.com/luciolucio/holi/blob/99d59621d52b4a1193949143ab43dfb7cbf2adda/deps.edn#L6. Is shadow-cljs a runtime dependency of your library?

Lucio Assis01:12:31

Thanks for looking, @UE21H2HHD. Yep, it is. I'm using shadow.resource/inline to provide access to a resource when the js gets built. See https://clojurians.slack.com/archives/C03S1L9DN/p1670366967808189 for reference. I could do it differently if that will currently cause a problem with cljdoc.

lread04:12:37

I've barely used shadow-cljs, but won't including it as a runtime dep potentially cause issues for users of your lib? I thought it was typically a build-time only dep?

Lucio Assis16:12:23

Typically yes, but other than the potential for version conflict I'd assume no other issues are expected, since it's just sitting there as any other dependency.

lread18:12:34

I'm gonna guess that differences in the Google Closure compiler are tripping things up. The version that shadow-cljs uses (v20221102 in your deps) is different from ClojureScript's version (v20220502). Maybe ping theller to see in #C6N245JGG with your current approach and ask if there is an alternative he can recommend.

lread21:12:37

@U028ZNM1S13 how would I use the holi lib from ClojureScript? If I setup a deps.edn like so:

{:deps {org.clojure/clojurescript {:mvn/version "1.11.60"} 
        io.github.luciolucio/holi {:mvn/version "0.12.0"}}}
And then bring up a cljs repl like so:
❯ clj -M -m cljs.main --repl-env node
ClojureScript 1.11.60
cljs.user=> 
When I try to require the holi ns, I get:
cljs.user=> (require '[luciolucio.holi :as holi])
Unexpected error (ExceptionInfo) compiling at (REPL:1).
No such namespace: @js-joda/core, could not locate _CIRCA_js_joda_SLASH_core.cljs, _CIRCA_js_joda_SLASH_core.cljc, or JavaScript source providing "@js-joda/core" (Please check that namespaces with dashes use underscores in the ClojureScript file name) in file file:/home/lee/.m2/repository/com/widdindustries/cljs.java-time/0.1.20/cljs.java-time-0.1.20.jar!/java/time.cljs

Lucio Assis22:01:07

Thanks, that's not what I expected. If I use shadow and include it in the dependencies then I get a working lib. Not sure if this is what I want, or if I need to make it self-contained - this is the first time I write something targeted at cljs. Thanks for those pointers, I'll tinker with things and hopefully the docs will solve themselves once I've fixed that.

lread04:01:43

Cool, once you get something working for regular ClojureScript, come on back and we'll be happy to help you get your docs working on cljdoc.

thanks2 2
Lucio Assis15:01:42

> I'm gonna guess that differences in the Google Closure compiler are tripping things up. Hi @UE21H2HHD! FYI, after removing the direct dependency, https://cljdoc.org/d/io.github.luciolucio/holi/0.13.1/doc/readme and look great! Now onto tinkering it to look like what I want 🙂 Many thanks for helping me out!

lread15:01:41

Wow, that's great @U028ZNM1S13! Thanks for sharing your success!