Fork me on GitHub
#tools-deps
<
2020-05-04
>
tianshu12:05:53

How can I make clojure cli download jars if Clojure 1.10.1 in ~/.m2 is not found.

Alex Miller (Clojure team)12:05:10

that will force the classpath to be recomputed, not used from cache and should trigger a download

Drew Verlee14:05:19

Is there a way to run the clj/clojure script so it doesn't try to resolve deps first? were getting a classpath error and were hoping to get some diagnostic information via J-XshowSettings:properties, but we hit the "cannot find artifact" error first.

Alex Miller (Clojure team)15:05:17

if you don't resolve deps, you can't make a classpath, and thus can't start a JVM to use that setting, so no?

Drew Verlee15:05:53

That makes sense. I guess i need to oreint myself, clj assumes you can start a JVM, but for debugging their is some information you can get before that. So i can just run java -XshowSettings:properties.

Drew Verlee15:05:09

is what a thing? 🙂

Alex Miller (Clojure team)15:05:53

I see it is - was confused by the help message after nvm

Drew Verlee16:05:36

If a deps procurer (local/root) points to another deps with a Procurer (e.g mvn/repos) Can i assume that it will read that Procurer or does it just grab the deps?

Alex Miller (Clojure team)16:05:17

if you're asking whether transitive dependency maven repos will be used to resolve dependencies, then no

Alex Miller (Clojure team)16:05:58

maven allows this, but it seems awfully dicey from a security pov so I kind of consider it an anti-feature

Drew Verlee16:05:01

its likely i'm not describing this correctly. I have a deps.edn with {:deps {datomic {:local/root "../datomic"}} and in "../datomic" the deps reads {:mvn/repos {"http://my.datomic.com" {:url "https..."}} It seems i have to add the mvn repos to the deps with the local/root procurer, even though that deps doesn't directly have a dep on datomic-pro. It has that dependency through the other deps. @alexmiller as always, thanks for the help.

Alex Miller (Clojure team)18:05:38

Yeah, that’s the scenario I’m describing

Alex Miller (Clojure team)18:05:10

The question is, do you want your transitive deps to make decisions about where you get things on the internet?

Alex Miller (Clojure team)18:05:10

The answer is definitely not an unqualified yes

Alex Miller (Clojure team)18:05:19

So it needs a lot of thought

Drew Verlee18:05:06

i understand. thanks alex.

vlaaad20:05:34

okay, I know how to bait Alex Miller to tell us some more about tools-build, watch this:

vlaaad20:05:02

tools-build is a fork of scala's SBT

Alex Miller (Clojure team)20:05:25

do you want me to write about it, or do you want me to finish it? :)

😄 4
dominicm20:05:00

I was going to make a joke reply, but now I'm trying to decide my actual stance on it... If I know the high level goal I can plan around it and start getting my chickens in a row 🐔

🦆 4
seancorfield21:05:33

@dominicm I'm curious how your chickens would be organized differently based on various possible high level goals of tools.build?

dominicm07:05:52

Apparently my ducks would be because I was a bit daft last night

dominicm07:05:24

Anyway. I usually find libraries from core require a shift in thinking or approach. Eg clj forces you to do your own builds, so I'd expect the ecosystem to start building -mains earlier in anticipation. I have done my best to make sure my build functions can be used in different ways, but I'm betting I missed something. Knowing whether it solves the java sources problem would allow people using lein currently who want to move off to start doing any prep they need, as I doubt there will be something as straightforward as :java-sources.

seancorfield15:05:17

I'm not sure what "prep" those lein users could realistically do, even if the goal was stated as "solves the java sources problem"?

seancorfield15:05:39

If tools.build can completely replace depstar, I'll be happy to switch to it. That means: build JAR and uberJAR, do AOT, specify the main namespace, Multi-Release JAR support, merging data readers (and several other types of files) in appropriate ways... If it also includes Java compilation, I might change how we build/deploy a couple of OSS Java projects that we currently build from source (manually, as needed) and use local JAR files for.