This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-11
Channels
- # beginners (79)
- # boot (21)
- # cider (28)
- # cljs-dev (1)
- # clojure (88)
- # clojure-italy (3)
- # clojure-russia (6)
- # clojurescript (49)
- # community-development (4)
- # cursive (37)
- # datomic (12)
- # editors (3)
- # emacs (33)
- # fulcro (15)
- # hoplon (9)
- # jobs-discuss (3)
- # keechma (3)
- # lein-figwheel (2)
- # luminus (3)
- # off-topic (146)
- # onyx (5)
- # portkey (11)
- # re-frame (34)
- # reagent (7)
- # reitit (5)
- # remote-jobs (1)
- # shadow-cljs (6)
- # unrepl (11)
@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])
nil
user=>
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])
nil
boot.user=>
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 REPLDoes that help @drewverlee?
@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: https://github.com/drewverlee/bar
lib (foo): https://github.com/drewverlee/barOK, 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 🙂 )
It was just calling my namespace (ns foo.clj)
doh
thats what happens when your doing 3 new things at once
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