This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-22
Channels
- # adventofcode (26)
- # aleph (34)
- # announcements (10)
- # babashka (71)
- # beginners (80)
- # biff (7)
- # calva (1)
- # cider (4)
- # cljdoc (12)
- # clojure (8)
- # clojure-belgium (1)
- # clojure-europe (11)
- # clojure-nl (3)
- # clojure-norway (18)
- # clojure-sg (3)
- # clojure-sweden (2)
- # clojurescript (18)
- # clojutre (4)
- # conjure (1)
- # core-logic (4)
- # datahike (1)
- # datascript (3)
- # emacs (27)
- # exercism (1)
- # gratitude (12)
- # introduce-yourself (4)
- # joyride (1)
- # lsp (46)
- # malli (3)
- # membrane (2)
- # nbb (1)
- # off-topic (3)
- # other-languages (7)
- # pedestal (4)
- # portal (3)
- # practicalli (1)
- # rdf (33)
- # re-frame (11)
- # releases (1)
- # ring (1)
- # scittle (34)
- # shadow-cljs (10)
- # squint (12)
- # tools-deps (89)
- # tree-sitter (2)
- # xtdb (14)
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.
Hi @U028ZNM1S13, I can take a peek for you.
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?
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.
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?
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.
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.
@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
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.
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.
> 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!
Wow, that's great @U028ZNM1S13! Thanks for sharing your success!