This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-20
Channels
- # aleph (3)
- # beginners (14)
- # cider (70)
- # cljdoc (30)
- # cljs-dev (1)
- # cljsjs (6)
- # clojars (7)
- # clojure (88)
- # clojure-greece (1)
- # clojure-italy (3)
- # clojure-nl (17)
- # clojure-spec (1)
- # clojure-uk (54)
- # clojurescript (48)
- # code-reviews (2)
- # cursive (28)
- # datascript (3)
- # datomic (20)
- # docs (1)
- # emacs (16)
- # figwheel-main (17)
- # fulcro (13)
- # graphql (2)
- # hyperfiddle (2)
- # jobs (2)
- # nyc (1)
- # off-topic (39)
- # parinfer (1)
- # re-frame (37)
- # reagent (225)
- # remote-jobs (3)
- # ring (3)
- # ring-swagger (1)
- # shadow-cljs (110)
- # spacemacs (10)
- # spirituality-ethics (1)
- # test-check (3)
- # tools-deps (36)
- # uncomplicate (2)
- # vim (7)
I’m testing deps with Cursive, and I’m finding that resolving several large projects at once is really slow. This is a project with several apps in it, all of which use a series of libraries transitively via ‘:local/root’. Is it possible that each project refresh works out a complete list of what to download up front and then downloads it, such that each project will download everything even if another project has concurrently downloaded that dep in the meantime?
In total there are 15 projects (including apps + libs), it uses kafka so who knows how much each one will download. But I’m on a 1 Gb fibre connection, so it’s generally pretty quick. It’s taking around 15-20 minutes to resolve them all.
It uses Maven to download as it goes, which uses the Maven cache
That said, I have spent no time optimizing any of that and none of it is parallel (but most likely some could be)
Right, my case is probably unusual in that if you set up a large project in Cursive (which I just did based on data a user sent me) then IntelliJ will go off and resolve all the projects in parallel.
Does the maven lib separate the resolution into a resolution step and a download step? I’m wondering if each project does the resolution step, decides what to download and then downloads it without checking before each download if something else has done so in the meantime?
Hi, is there a recommended way to integrate lein with tools-deps? I want to use git dependencies
The only one I know: https://github.com/RickMoynihan/lein-tools-deps
@mping Not sure about "recommended", but I'm using lein-tools-deps
- works pretty well so far. Only things that don't work are lein deps :tree
, lein search
AFAICT
is there a function in tools.deps that I could use to generate a vector of maps containing all remote dependencies for a project's dependencies, plus, if possible, the sha-sums of the .jar files. I'm wiring a deriviation for nix(Os), and it seems that there's no tool for generating nix expression for clojure dependencies available. There's one for maven, called mvn2nix. I guess I could use that, but I'd have to make some hack for mirrors, adding clojars etc..
@alexmiller: should the tools.deps library be including slf4j-nop? https://github.com/clojure/tools.deps.alpha/blob/744c9c027b1b0d71081a7903b517abbd960a9849/deps.edn#L15
@dominicm thanks for the tip, I'm getting all the deps printed, which is good. But that which is missing, is the url's to the .jar files
fipp
{:versions
{#:mvn{:version "0.6.12"}
{:mvn/version "0.6.12", :deps/manifest :mvn}},
:paths {#:mvn{:version "0.6.12"} #{[]}},
:select #:mvn{:version "0.6.12"},
:pin true},
probably straightforward to do, but how would I get the download urls from this information?yes I did this
(prn
(pprint (resolve-deps '{:deps
{org.clojure/clojure {:mvn/version "1.9.0"}
org.clojure/clojurescript {:mvn/version "1.10.238"}
org.clojure/tools.reader {:mvn/version "1.3.0-alpha3"}
com.cognitect/transit-cljs {:mvn/version "0.8.256"}
malabarba/lazy-map {:mvn/version "1.3"}
fipp {:mvn/version "0.6.12"}}}
{:verbose true}
)))
Something looks off about your result to me. The value of :paths
for me is different, I have jars in there.
com.google.protobuf/protobuf-java
{:mvn/version "3.0.2",
:deps/manifest :mvn,
:paths
["/home/hlolli/.m2/repository/com/google/protobuf/protobuf-java/3.0.2/protobuf-java-3.0.2.jar"],
:dependents [com.google.javascript/closure-compiler-unshaded]},
the pain with nix, is that nothing can be downloaded without being declared, all http fetches need to be done on nix's side
I don't think you can get the remote urls, I think it's blackboxed into a maven library
maybe, you can always download jars directly from clojars, maybe maven is more blackboxed