This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-24
Channels
- # aleph (19)
- # announcements (59)
- # asami (34)
- # aws (1)
- # babashka (17)
- # beginners (174)
- # bitcoin (11)
- # calva (16)
- # chlorine-clover (5)
- # cider (5)
- # clj-kondo (14)
- # cljsrn (13)
- # clojars (25)
- # clojure (124)
- # clojure-australia (1)
- # clojure-europe (48)
- # clojure-nl (4)
- # clojure-spec (1)
- # clojure-uk (40)
- # conjure (6)
- # core-async (25)
- # cursive (30)
- # data-oriented-programming (3)
- # datomic (14)
- # depstar (14)
- # emacs (3)
- # graalvm (27)
- # helix (1)
- # honeysql (25)
- # hoplon (3)
- # jobs-discuss (6)
- # kaocha (3)
- # lsp (109)
- # lumo (1)
- # malli (5)
- # meander (21)
- # music (1)
- # pathom (1)
- # re-frame (4)
- # reitit (1)
- # remote-jobs (1)
- # reveal (11)
- # rewrite-clj (3)
- # shadow-cljs (42)
- # spacemacs (15)
- # sql (13)
- # startup-in-a-month (4)
- # tools-deps (45)
- # vim (16)
- # xtdb (23)
- # yada (1)
@tcrawley food for thought (in screenshot, conversation from #tools-deps) https://github.com/borkdude/deps-infer
@tcrawley I think for the purpose of libs like these, it would be super awesome if clojars had some kind of index of jars + the list of files in each jar, as EDN, or transit, which refreshed every so often (daily, weekly, monthly)
I think that would be great! I'm focused on adding group validation currently, but we could tackle this afterward. Do you have code already that will generate the index for a single jar?
@tcrawley Yeah, this code is in https://github.com/borkdude/deps-infer We could work on this together if you want. The part I do not control is the "ops" side, but I can write the "script" that produces the index from a dir of jars
A script to processes a sparse maven repo dir would do the trick. "sparse" meaning it is in the correct shape (`group-name/artfact-name/0.1.0/artifact-name-0.1.0.jar`), but has no pom files. The repo is in s3, but we sync down all of the jar files nightly in order to generate the maven-style indexes for tooling, and could generate this index as part of that process.
We could then upload these ns indexes to s3 alongside the feeds/jar lists: https://github.com/clojars/clojars-web/wiki/Data#list-of-jars-and-versions-in-leiningen-syntax
@tcrawley Right now I have some code which walks over a dir with .jar files and produces one huge map:
{accountant.core
[{:mvn/version "0.2.5",
:file "accountant/core.cljs",
:group-id "venantius",
:artifact "accountant"}],
adzerk.boot-cljs
[{:mvn/version "2.1.5",
:file "adzerk/boot_cljs.clj",
:group-id "adzerk",
:artifact "boot-cljs"}],
adzerk.boot-cljs-repl
[{:mvn/version "0.4.0",
:file "adzerk/boot_cljs_repl.clj",
:group-id "adzerk",
:artifact "boot-cljs-repl"}],
adzerk.boot-cljs.impl
[{:mvn/version "2.1.5",
:file "adzerk/boot_cljs/impl.clj",
:group-id "adzerk",
:artifact "boot-cljs"}],
adzerk.boot-cljs.js-deps
[{:mvn/version "2.1.5",
:file "adzerk/boot_cljs/js_deps.clj",
:group-id "adzerk",
:artifact "boot-cljs"}],
adzerk.boot-cljs.middleware
[{:mvn/version "2.1.5",
:file "adzerk/boot_cljs/middleware.clj",
:group-id "adzerk",
:artifact "boot-cljs"}],
@tcrawley I have this code here:
https://github.com/borkdude/deps-infer/blob/main/src/deps_infer/clojars.clj
It prints to stdout.
You can run it with clojure -M -m deps-infer.clojars > /tmp/index.edn
Thanks! I'll see if I can find some time today to kick this off on the server to see how long it takes and how large of a file it produces.
I produced both an .edn and .transit file and zipped both, here's how it looks on my machine:
$ ls -la /tmp/index*
-rw-r--r-- 1 borkdude wheel 4363922 Feb 24 16:07 /tmp/index.edn
-rw-r--r-- 1 borkdude wheel 214482 Feb 24 17:00 /tmp/index.edn.zip
-rw-r--r-- 1 borkdude wheel 3594066 Feb 24 16:59 /tmp/index.transit.json
-rw-r--r-- 1 borkdude wheel 393184 Feb 24 17:01 /tmp/index.transit.zip
Funnily enough, the zipped edn looks better than the zipped transit.I tried to run it on the repo cached on the server last night, but realized my recollection of how we build the maven index was wrong - we pull down the poms, not the jars for indexing :( However, I think we could: • pull down the jars once and index those, then store the index in s3 • index new jars as they are deployed, then merge with the existing index This should work since existing releases are immutable. We could also store the index as many timestamped files - that would allow clients to be able to cache the index, pulling down new files and merging them. I suspect the full index file will be pretty large.
Good deal. We should probably open an issue at https://github.com/clojars/clojars-web/issues/new/choose and continue this discussion there