Fork me on GitHub
Drew Verlee02:02:59

@seancorfield how do you merge in a dep via the git deps ? i tried (deps :config-paths ["deps.edn"] :quick-merge true) and was hoping my lib in deps.edn would be available in my repl, but its not. Is probably i’m not interpreting quick merge correctly.


@drewverlee deps.edn is automatically read from the current directory -- you don't need to specify that.


Does clj work for you? i.e., does it start a REPL with your library available.


There's no point in using boot-tools-deps unless you've gotten the basics up and running with clj first.


@drewverlee here's an example session showing what you should expect with boot-tools-deps

sean@sean-xps:~/clojure/drew$ cat deps.edn
{:deps {clj-http {:mvn/version "RELEASE"}}}
sean@sean-xps:~/clojure/drew$ ls
deps.edn  src
sean@sean-xps:~/clojure/drew$ clj
Clojure 1.9.0
user=> (require '[clj-http.client :as http])
sean@sean-xps:~/clojure/drew$ boot -d seancorfield/boot-tools-deps deps repl
Clojure 1.9.0
boot.user=> (require '[clj-http.client :as http])
both clj and boot-tools-deps read deps.edn by default and in the REPL you can just require it in as expected (note: boot requires src to exist, clj doesn't, so I created an empty src folder)


In particular, the REPL only needs the library on the classpath so you do not need to merge things into :dependencies at all (but you may need that later for some Boot tools/tasks to work).


Also note, in my example above, there is no build.boot file!


If you don't want to specify boot-tools-deps on the command-line like that, you can use a minimal build.boot

(set-env! :dependencies '[[seancorfield/boot-tools-deps "RELEASE"]])

(require '[boot-tools-deps.core :refer [deps]])
and then just say boot deps repl to start a REPL

Drew Verlee20:02:24

@seancorfield it does. But i must not understand something from reading the docs because my project looks similar but doesn’t work when i run

➜  app git:(master) clj -m bar
Exception in thread "main" java.lang.Exception: namespace 'foo' not found after loading '/foo', compiling:(bar.clj:1:1)
app: lib (foo):


OK, i'll clone that and take a look...


The :git/url was incorrect -- should be :git/url "" @drewverlee (when clj didn't even try to access the GitHub repo, I assumed it was missing altogether).


Once that's corrected, you get a failure to find foo after loading foo.clj -- that's because you have (ns foo.clj) in in -- should be (ns foo).


If you fix that (and update the SHA), you'll get a failure from clj -m bar because your bar.clj has no -main function.


Once those three things are all fixed, I think it will work @drewverlee (and then you can start to try boot-tools-deps I guess 🙂 )

Drew Verlee21:02:32

It was just calling my namespace (ns foo.clj) doh

Drew Verlee21:02:42

thats what happens when your doing 3 new things at once

Drew Verlee21:02:11

i’m not sure you need “.git” as it works without and the example doesn’t have it. But everything is working as expected now. Thanks a ton. I think this is a really great step forward towards encouraging ppl to build small libs within there system


It didn't work for me without the .git extension, FWIW.


Hmm, it works now without the extension. Odd. It didn't clone the repo the first time. I added the .git and it cloned it. I just removed it and it still cloned it 👀


OK, glad you have it working -- now you can start to use boot-tools-deps with it 🙂 @drewverlee