This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-29
Channels
- # admin-announcements (1)
- # announcements (20)
- # babashka (43)
- # beginners (134)
- # calva (2)
- # clerk (7)
- # cljdoc (9)
- # clojars (8)
- # clojure (91)
- # clojure-europe (21)
- # clojure-nl (1)
- # clojure-norway (13)
- # clojure-uk (1)
- # clojurescript (5)
- # datahike (3)
- # docker (2)
- # emacs (6)
- # fulcro (7)
- # graphql (9)
- # honeysql (24)
- # improve-getting-started (5)
- # introduce-yourself (1)
- # lambdaisland (1)
- # luminus (3)
- # malli (3)
- # nbb (19)
- # off-topic (22)
- # pathom (1)
- # portal (3)
- # practicalli (1)
- # rdf (26)
- # reagent (29)
- # reitit (9)
- # shadow-cljs (15)
- # spacemacs (3)
- # sql (4)
- # tools-build (30)
- # xtdb (41)
Hi all. I have removed a dependency from deps.edn for one of my libraries as it is optional. It would therefore be :scope provided
using older tooling... (although I never used lein myself). However, this now means clojars can't build documentation, as one of my namespaces requires that third-party dependency. I've read https://github.com/cljdoc/cljdoc/blob/master/doc/fixing-builds.md but I'm unsure how to fix. Is there a way of providing an alias, or set of aliases to use in the cljdoc build? I don't think deps.edn supports listing optional dependencies except through aliases. I'd be grateful for for any pointers. Thank you!
I tried using a source pom.xml with the required dependency explicitly listed as 'provided', but it appears the whole <dependencies> section is overwritten by tools.build so don't think that will work.
Lines 7-38 are my solution here…
That looks clever. Thank you! It feels as if the standard tools.build write-pom could support adding in other deps or merging any deps from a source template POM with those from deps.edn.
Hmm... yes this flow is a tad awkward. I really should get around to finishing up implementing static API analysis for cljdoc.
For libs that don't dynamically generate their API at load time (potemkin import-vars type stuff), static analysis would do the trick without any need for specifying any provided
deps.
Thanks @UE21H2HHD - although my reflections on this are that to play nicely with the Java ecosystem my pom.xml should include optional dependencies with scope 'provided'. So, I have asked a question on http://ask.clojure.org. https://ask.clojure.org/index.php/12817/tools-support-providing-additional-dependencies-provided