Fork me on GitHub
#tools-deps
<
2020-04-28
>
Bhougland12:04:59

total newb question, but where does deps.edn install the libraries?

kszabo12:04:07

~/.m2 and ~/.gitlibs

kszabo12:04:10

by default

teodorlu12:04:46

~/.m2 is the same as Maven and Leiningen.

$ find ~/.m2 -iname 'clojure*jar'
/home/teodorlu/.m2/repository/net/mikera/clojure-utils/0.8.0/clojure-utils-0.8.0.jar
/home/teodorlu/.m2/repository/clojure-msgpack/clojure-msgpack/1.2.1/clojure-msgpack-1.2.1.jar
/home/teodorlu/.m2/repository/org/clojure/clojurescript/1.10.520/clojurescript-1.10.520.jar
/home/teodorlu/.m2/repository/org/clojure/clojurescript/1.10.597/clojurescript-1.10.597.jar
/home/teodorlu/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar
/home/teodorlu/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar
/home/teodorlu/.m2/repository/clojure/java-time/clojure.java-time/0.3.2/clojure.java-time-0.3.2.jar
/home/teodorlu/.m2/repository/com/theoryinpractise/clojure-maven-plugin/1.7.1/clojure-maven-plugin-1.7.1.jar
/home/teodorlu/.m2/repository/com/cemerick/clojurescript.test/0.0.4/clojurescript.test-0.0.4.jar

Bhougland12:04:46

then the trace.edn tellls my project how to find them?

Bhougland12:04:30

nevermind. that doesn't show a path on my local machine

teodorlu12:04:09

Based on your deps.edn file, you get a classpath. Try running clj -Spath in a deps project, and you'll se it refer back into where your libraries are installed.

Bhougland12:04:19

{:version "1.10.1.489" :config-files ["/home/ben/.clojure/deps.edn" "deps.edn" ] :config-user "/home/ben/.clojure/deps.edn" :config-project "deps.edn" :install-dir "/nix/store/msn2kqpck9c5iin8hgjzm5chpwpm2167-clojure-1.10.1.489-prefix" :config-dir "/home/ben/.clojure" :cache-dir ".cpcache" :force false :repro false :resolve-aliases "" :classpath-aliases "" :jvm-aliases "" :main-aliases "" :all-aliases ""}

Bhougland12:04:45

Does this look okay?

Bhougland12:04:09

I am questioning the :install-dir because I use Nixos and this path would be immutable

Alex Miller (Clojure team)12:04:16

The install dir isn’t used anymore

teodorlu12:04:37

I must admin that I'm not sure about what you're asking.

Bhougland12:04:05

my repl can never mind my classpath

teodorlu12:04:26

If you want to use deps.edn the "Nix way", I'm guessing you'll want guaranteed immutable references to what's normally a mutable folder in ~/.m2. But then you'll have to do some major modifications to tools-deps, I think. Other people might be able to answer better.

Bhougland12:04:33

I don't really want to do it the nix way. I just want to transistion to deps.edn and my repl yells at me that it can never find my classpath

teodorlu12:04:08

Oh, so you've installed the clojure tool via Nix, it doesn't work, and you just want it to work?

Bhougland12:04:40

Yes. But I am wondering if it is nix or my lack of understanding on some point

teodorlu12:04:21

Hmm. I love Nix, but for Clojure I just use the official installer: https://clojure.org/guides/getting_started#_clojure_installer_and_cli_tools

Bhougland12:04:18

I appologize, earlier I posted Sdescribe not Spath. Spath is showing the .m2 directiory like it should

Bhougland12:04:53

another vairable that is probably tripping me up is that I wired together Kakoune and the klipse-repl. I probably did something wrong there.

Bhougland12:04:17

Thanks for the help

teodorlu12:04:08

Don't think I'll be able to help you with that setup. If you want a simple experience getting started, the official Clojure installer + #calva should be a good place to start.

Bhougland12:04:04

Thanks for the support, it helped me target the most likely issue.

👍 4