简体   繁体   中英

Display loaded dependencies in leiningen REPL

I'm running into problems because the library I have appears to conflict with the published documentation. I had a few problems with getting the right version of things installed before, and I'm wondering if this is the cause.

Is there any way to print out which jars were loaded in the repl so I can check?

You can also use query lein for

  • the classpath with lein classpath
  • a dependency tree printout with lein deps :tree

This might also help:

lein deps :tree - shows a tree of dependencies that get pulled in

[library "version" :exclusions [some-other-lib "version"]] - exclude the some-other-lib that gets pulled in by some library.

You can then manually pull in the right version of some-other-lib by defining your own dependency vector.

(System/getProperty "java.class.path")

There are several options:

  • using java interrop: (System/getProperty "java.class.path") , (println (seq (.getURLs (java.lang.ClassLoader/getSystemClassLoader))))
  • clojure/java.classpath contains useful functions: like system-classpath
  • lein : lein classpath and lein deps :tree
  • boot : boot show -p , as well as useful function in boot environnement . Maybe have a look at martinklepsch/boot-deps .

For boot , I also wrote nha/boot-deps that helps managing dependency conflicts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM