Fork me on GitHub
#cljdoc
<
2024-04-03
>
martinklepsch09:04:37

Hi Ben! cljdoc downloads your jar from Clojars and resolves dependencies as per pom.xml Looking at the logs it looks like it can't find the aero.alpha.core namespace. I think this is because you depend on it only in deps.edn and not in pom.xml If you update the pom.xml to contain the respective dependency it should work. That does require the dependency to be available in a Maven repo though.

Ben Sless10:04:45

Ah, I see Thanks!

martinklepsch10:04:36

Hope that helps / will work for you. It would be nice to fully support deps.edn but given that API docs on cljdoc are always versioned its a bit complicated

Ben Sless11:04:40

Not sure I see why that is so

Ben Sless11:04:34

I assume I'd have to not just update my pom but use a mvn version for aero as well?

martinklepsch12:04:52

deps.edn doesn't have a version / is usually used via git so it's not "tagged" in a sense. Everything in cljdoc is tagged to a version. Does that make more sense? I'm a bit tired so maybe this explanation isn't the best 😁

martinklepsch12:04:13

And yeah you'd have to use a maven version of aero as well as you can't specify git coordinates in pom.xml

lread12:04:46

fwiw, we did a bunch of thinking for supporting libs from sources https://github.com/cljdoc/cljdoc/issues/459

Ben Sless12:04:09

Seems like it doesn't cover clojars published libs with git dependencies then. It's not critical, thanks anyway 🙂

lread12:04:12

oh that’s not something that clojars supports

Ben Sless12:04:20

worked fine for my lib just now :thinking_face:

Ben Sless12:04:18

you're saying it will break for lein users?

Ben Sless12:04:03

damn, okay, using the maven dep

lread13:04:42

I’m probably missing some detail of what you are doing (or maybe have not had enough coffee yet!) but clojars is maven based and works with jars and poms. I do have a foggy memory of the now deprecated depstar bringing source code from git dep sources into the jars it built… are you using depstar to build your jar?

Ben Sless13:04:45

No, but it's probably a bad idea to use a git dep in a library then publish to clojars.

👍 1
lread13:04:22

When discovering a lib’s public api, cljdoc actually loads all namespaces not marked with :no-doc in the lib jar. Cljdoc hit a ns in your jar that it could not load. Regular users of your jar would experience the same problem.

Ben Sless13:04:11

That's very good to know, thanks!

lread16:04:17

Happy to help! Drop by anytime you get stuck or have more questions!

🙏 1