Open mainej opened 3 years ago
As a bit more context, cljdocs wasn't able to build my library because my pom.xml didn't include the optional dependency. After adding the optional dependency, cljdocs builds OK. However, to get the optional dependency into the pom, I have to shell out to clojure -Spom
in the middle of my deploy process. I'd rather be able to use the regular clojure -A:release --patch
flow.
My library has an optional dependency, that is, a dependency that is only needed when users need a specific part of the library. (Note that this is different from a "scope provided" dependency, which is always needed. Here is one explanation of the difference.) I would like to mark this dependency appropriately in my pom.xml, so that it isn't transitively included in my users' dependency trees unless they need it.
As of
tools.deps.alpha
0.9.745 there is a way to specify this type of dependency. You add the dependency as a regular entry in:deps
, with an additional:optional true
flag. Then, when you runclojure -Spom
, the dependency is marked as<optional>true</optional>
in the pom. However,deps-library
depends ongaramond
0.4.0, which in turn depends ontools.deps.alpha
0.5.460. Thereforedeps-library
doesn't add theoptional
tag, and in fact strips it out if it already exists.So, I'd like to request that you coordinate with
garamond
to update to a more recent version oftools.deps.alpha
. It looks like a bump oftools.deps.alpha
has already been committed, but that commit hasn't been released. I'll reach out togaramond
as well to request that they release a new version of their library.Thanks for your work making deps.edn libraries work with Clojars—it's a really fiddly business.