Fork me on GitHub
#tools-deps
<
2020-01-02
>
robert-stuttaford08:01:58

probably an FAQ but my google-fu is lacking ; is there an order of precedence among :mvn/version and :local/root? could i somehow use both, where local is used for dev, but mvn is used for ci? has anything been written about producing this sort of environment specific variance?

delaguardo09:01:55

We are using special alias for CI builds with :override-deps key inside

dominicm11:01:27

It'll be an array map, so whichever namespace is found first most likely. As mentioned you should use override deps.

Alex Miller (Clojure team)14:01:11

the way the code is written (https://github.com/clojure/tools.deps.alpha/blob/master/src/main/clojure/clojure/tools/deps/alpha/extensions.clj#L32-L37) it depends on the first namespace key found in a map, so you should not assume any arbitrary order. Really, I'd say this is an error.

Alex Miller (Clojure team)14:01:46

the whole point of stuff like :override-deps is to explicitly support the use case of changing a dep source

robert-stuttaford06:01:11

Works beautifully.

dharrigan11:01:26

Does this -Sdeps DEPS Deps data to use as the final deps file take a map?

dharrigan11:01:03

i.e., if I want to pass in mvn/repo configuration on the command line, thus ignoring whatever is set in any deps.edn file, is it this switch I require?

dharrigan11:01:40

yup is the answer 🙂

dharrigan11:01:27

Where does deps store downloaded deps, i.e., jars? In the .m2 directory?

borkdude13:01:22

@dharrigan you can check that with -Spath

borkdude13:01:00

This is an example for mvn + git:

src:/Users/borkdude/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar:/Users/borkdude/.gitlibs/libs/borkdude/medley/91adfb5da33f8d23f75f0894da1defe567a625c0/src:/Users/borkdude/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar:/Users/borkdude/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar

seancorfield17:01:54

seancorfield/depstar {:mvn/version "0.5.0"} now manages the AOT compilation folder automatically -- no need to manually create classes or add it to the classpath; seancorfield/clj-new {:mvn/version "0.8.3"} updated to use latest depstar (so app template no longer needs classes folder).

bananadance 4
vlaaad21:01:31

And I am still on 0.2.1 because it does what it needs to do 🙂

seancorfield21:01:58

That's good to hear! :thumbsup::skin-tone-2:

seancorfield21:01:42

0.5.1 and 0.8.4 just released to add support for projects where the main namespace has - in its path and/or its name.