Fork me on GitHub
#clojars
<
2023-06-09
>
Etienne Théodore10:06:10

Hi ! Can it be possible to add a filter-by-cljd when searching for a CLJD package? See this thread for more info: https://clojurians.slack.com/archives/C03A6GE8D32/p1686303473760409

👍 2
tcrawley10:06:34

That's an interesting idea. I could see it being useful to have a way to search by platform (`platform:cljd`, platform:cljs, etc). However, we don't know of a way for us to identify the platform of a release. There really isn't a mechanism to signal that through the pom file that I know of.

lread13:06:34

Cljdoc currently guesses based on file extensions found in the jar. This worked ok-ish when there was only Clojure and ClojureScript but is now flawed that more platforms are emerging. We also have a way for library authors to specify the https://github.com/cljdoc/cljdoc/blob/master/doc/userguide/for-library-authors.adoc#api-languages`cljdoc.edn` and have plans to extend this to more platforms. All this to say... maybe this type of search might be supported someday on cljdoc.

lread13:06:03

But I don't know if there is a deterministic way to reliably automatically learn target platforms even if we dig into source analysis. For example, if a lib is all .cljc files and has no reader conditionals (or has reader conditionals for some supported platforms but not all) in its sources, how do I know what its supported platforms are? We'd probably need to rely on library authors doing some tagging. Which library authors probably(?) would mostly not do. So maybe searching the pom description, while imperfect, is ok-ish. For example, if I search for ClojureDart, I do find re-dash.

jamesleonis02:06:56

I'm late to this thread, but I write .cljc libraries 😅 I'm (slowly) in the process of modernizing to deps.edn and I would like to work in this flag (whatever it turns out to be) https://gitlab.com/jamesleonis/bencode-cljc