Fork me on GitHub
#tools-deps
<
2018-07-08
>
cfleming10:07:40

b) is absolutely useful. I use it to compile Clojure code against the IntelliJ classes, but not have them included when I run.

cfleming10:07:26

What would be the deps solution to that - two separate classpaths using aliases? I guess I’d need an alias for the IntelliJ classes and would have to use that when compiling but not running?

dominicm10:07:09

aliases is how I've solved it up until now.

Alex Miller (Clojure team)15:07:57

You seem to be describing using provided scope aliases in your own project (which is useful, but handled by aliases). The question I read above though sounded like how to include transitive provided-scope deps, which does not seem like a thing you should do

martinklepsch16:07:21

Yeah, I need b) for a similar tooling related concern

martinklepsch16:07:45

I want to load code from Artifact A which has a “provided” dependency B. Now I’d like to make sure all these dependencies are loaded without manually listing those “provided” deps. Hope that makes sense

Alex Miller (Clojure team)16:07:04

Well, the whole point of provided scope is: you provide them

Alex Miller (Clojure team)16:07:17

So, not going to make something to do this

dorab17:07:19

Is resolve-deps supposed to download the relevant dependencies if I call it myself?

dorab17:07:50

dorab@dorab-OptiPlex-9020:~$ clj -Srepro -A:deps
Clojure 1.9.0
user=> (require '[clojure.tools.deps.alpha :as tda])
nil
user=> (tda/resolve-deps '{:deps {org.clojure/core.cache {:mvn/version "0.6.5"}}} {})
ArtifactNotFoundException Could not find artifact org.clojure:core.cache:jar:0.6.5  org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:412)
user=> 
dorab@dorab-OptiPlex-9020:~$ clj -Srepro -A:deps -Sdeps '{:deps {org.clojure/core.cache {:mvn/version "0.6.5"}}}'
Downloading: org/clojure/core.cache/0.6.5/core.cache-0.6.5.pom from 
Downloading: org/clojure/data.priority-map/0.0.7/data.priority-map-0.0.7.pom from 
Downloading: org/clojure/data.priority-map/0.0.7/data.priority-map-0.0.7.jar from 
Downloading: org/clojure/core.cache/0.6.5/core.cache-0.6.5.jar from 
Clojure 1.9.0
user=> (require '[clojure.tools.deps.alpha :as tda])
nil
user=> (tda/resolve-deps '{:deps {org.clojure/core.cache {:mvn/version "0.6.5"}}} {})
ArtifactNotFoundException Could not find artifact org.clojure:clojure:jar:1.4.0  org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:412)
user=> 

dorab17:07:36

If it is supposed to work, what am I doing wrong above?

dorab17:07:34

BTW, this is in a directory (my home dir) that does not have a deps.edn in it.

Alex Miller (Clojure team)21:07:17

You need to provide the :mvn/repos to look in (these are in the install deps.edn with clj)

dorab21:07:18

Ah. I thought those would automatically be included. So, I should create the full deps.edn map myself and then pass that to resolve-deps. Thanks.