cljdoc

Ben Sless 2024-04-03T08:19:57.551349Z

Trying to understand why this build fails, is there a problem with git dependencies? https://app.circleci.com/pipelines/github/cljdoc/builder/50687/workflows/e0c33864-6dae-4c12-9dbb-ec08e7bfc235/jobs/67062 Project: https://github.com/bsless/aero.extensions

martinklepsch 2024-04-03T09:16:37.315739Z

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 Sless 2024-04-03T10:48:45.262159Z

Ah, I see Thanks!

martinklepsch 2024-04-03T10:50:36.118129Z

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 Sless 2024-04-03T11:02:40.606759Z

Not sure I see why that is so

Ben Sless 2024-04-03T11:12:34.425339Z

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

martinklepsch 2024-04-03T12:32:52.697149Z

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 😁

martinklepsch 2024-04-03T12:33:13.868949Z

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

lread 2024-04-03T12:40:46.783449Z

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

Ben Sless 2024-04-03T12:47:09.064339Z

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

lread 2024-04-03T12:49:12.139499Z

oh that’s not something that clojars supports

Ben Sless 2024-04-03T12:55:20.096889Z

worked fine for my lib just now 🤔

Ben Sless 2024-04-03T12:56:18.096629Z

you're saying it will break for lein users?

Ben Sless 2024-04-03T12:59:03.202209Z

damn, okay, using the maven dep

lread 2024-04-03T13:06:42.035859Z

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 Sless 2024-04-03T13:07:45.031149Z

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

👍 1
lread 2024-04-03T13:16:22.449339Z

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 Sless 2024-04-03T13:35:11.032009Z

That's very good to know, thanks!

lread 2024-04-03T16:01:17.381189Z

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

🙏 1