Fork me on GitHub
#tools-deps
<
2019-01-15
>
richiardiandrea00:01:31

we are doing like the above, I have also a deps.edn only project but having lein makes it easy for colleagues to use Cursive, which still has some quirks with deps.edn

cfleming00:01:12

@richiardiandrea It does? I’d like to hear about them.

richiardiandrea00:01:42

ah ah for sure 😄 one of my colleagues opened a couple of issues so you are aware of everything I think, don't remember which ones....wherever you see monorepo is us I guess!

cfleming21:01:52

Ok, I’ll check those out, thanks - AFAIK most things should be fixed these days.

vemv15:01:04

👋 I asked this yesterday in off-topic, wondering what you think about it https://clojurians.slack.com/archives/C03RZGPG3/p1547483045535400 One thing I would fear if people widely adopted "SHAs for every dependency" is that two different libraries (let's call them A and B) could independently declare a dependency on C, but at different SHAs. Is that a scenario that tools.deps can gracefully handle?

Alex Miller (Clojure team)15:01:38

well depends what part you’re asking about

Alex Miller (Clojure team)15:01:56

if you declare two sha’s in the transitive dep tree, it will use the newer one

vemv15:01:30

thank you! I'll look into using tools.deps at work then 🙂

Alex Miller (Clojure team)15:01:08

Where newer = more descendant. If there is no descendant relationship (independent branches) then it’s an error

👍 20
Alex Miller (Clojure team)15:01:19

(same as we do for Maven artifacts)

avi20:01:59

So in this library I’m hoping to help out with, I’ve moved the dependencies from project.clj to deps.edn and added the plugin lein-tools-deps to project.clj. lein deps seems to work just fine, but when I run lein test I get:

$ lein test
Error: Could not find or load main class clojure.main
Caused by: java.lang.ClassNotFoundException: clojure.main
Tests failed.
I tried changing the clojure version specified in deps.edn to 1.9.0 and 1.10.0 but that seemed to have no effect. Anyone know what’s happening here, what I’m missing?

ghadi20:01:41

seems like your tests are not picking up the dependencies

ghadi20:01:56

I wonder if your lein-tools-deps plugin isn't working in the test profile

avi20:01:08

Hmm, OK, I’ll look into that — thanks!

avi21:01:34

Aha, I needed to add :middleware and :lein-tools-deps/config to project.clj — as explained clearly in the docs of lein-tools-deps! (docs ftw)

thosmos21:01:44

@aviflax I had that same problem with Cursive and the only thing I found to get around it was to downgrade lein-tools-deps to "0.4.1"

avi21:01:55

Have you tried adding those keys to your project.clj ?

aaelony23:01:10

I have a codebase that I’ve instrumented with tools-deps and can run via

clj -m something.main <args>
from the command line. What do folks typically do or what guidance is out there to make it easier for other (non clj) users to run it. In the past, I’d have done a lein uberjar and wrapped it in a bash script. Is there a better way?