cljdoc

Ludger Solbach 2026-01-31T12:58:40.138239Z

I'm currently building a Clojure wrapper for the ArrayFire tensor C/C++ library (https://github.com/lsolbach/arrayfire-clj). I've pushed a snapshot to clojars and tried to build the docs on cljdoc, which failed, because the ArrayFire library (libaf) is not available (see https://app.circleci.com/pipelines/github/cljdoc/builder/71048/workflows/b7d54133-60e9-441e-9532-005c4ab8adae/jobs/87422). Installing ArrayFire is quite elaborate, there's no recent package or maven package to install. Is there a way to skip the build and only generate the docs on cljdoc?

lread 2026-01-31T13:30:11.447669Z

Hi @lsolbach! I have many cljdoc works-in-progress... one of them is building API docs staticly (https://github.com/cljdoc/cljdoc/issues/543). I think this would probably work for your use case. Although... it is still a wip.

Ludger Solbach 2026-01-31T13:49:42.649819Z

Strict analysis as a default is totally fine for me. It has even caught some dependency problems in a release of mine once or twice. That's why I always generate the docs for a snapshot before releasing code. But in case of ArrayFire I don't see a reasonable way of providing it via dependencies. An option to disable the analysis would be the best, IMHO. arrayfire-clj also generates FFI binding functions for the C API of ArrayFire. But those are a 1:1 copy of the C API so the ArrayFire docs are fine and could be linked. These functions are not part of the API of arrayfire-clj, as they are low level and not integrated in the JVM/Clojure ecosystem. The rest of the doc should be static.

lread 2026-01-31T14:02:33.001959Z

Interesting. So what would be shown where cljdoc normally shows API docs?

Ludger Solbach 2026-01-31T14:37:20.169619Z

All the docs except for the macro-generated symbols in the FFI namespaces.

Ludger Solbach 2026-01-31T14:39:15.024359Z

So everything that could be statically generated.

lread 2026-01-31T15:05:24.406159Z

Oh, we might be using different terms. By "strict analysis" do you mean the current dynamic API analysis done today by cljdoc where namespaces are loaded to discover the API? And by "skip the build" do you mean skip the API analysis entirely? Maybe a picture will help:

Ludger Solbach 2026-01-31T15:11:35.182899Z

I mean analyze the codebase statically based on the source code, so discover all vars in the source code. All vars generated at compile time by macros or otherwise will not be there because they are not present in the source code..

Ludger Solbach 2026-01-31T15:13:10.764149Z

It's an analysis nonetheless, but it does not try to compile the code.

Ludger Solbach 2026-01-31T15:15:53.540349Z

So the API is shown, but missing some vars which are not available by just looking at the source code. I could live with that for arrayfire-clj.

Ludger Solbach 2026-01-31T15:18:18.230469Z

this analysis would be independent of any compile/runtime requirements of the project (e.g. missing libs or JDK mismatches).

lread 2026-01-31T15:22:05.603099Z

Ah, thanks, I understand now. So this is what https://github.com/cljdoc/cljdoc/issues/543 is about. Perhaps I'll try to reboot that effort sometime soon.

Ludger Solbach 2026-01-31T15:34:17.543679Z

Yes, I've read through that issue and it matches my problem.

👍 1