This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # arachne (4)
- # bangalore-clj (1)
- # beginners (38)
- # boot (182)
- # cider (21)
- # cljs-dev (9)
- # clojars (5)
- # clojure (229)
- # clojure-austin (1)
- # clojure-berlin (1)
- # clojure-czech (3)
- # clojure-dusseldorf (3)
- # clojure-ireland (5)
- # clojure-italy (4)
- # clojure-russia (33)
- # clojure-spec (73)
- # clojure-taiwan (6)
- # clojure-uk (22)
- # clojure-ukraine (1)
- # clojurescript (80)
- # core-async (26)
- # cursive (3)
- # datascript (20)
- # datomic (9)
- # defnpodcast (8)
- # editors (4)
- # emacs (7)
- # garden (41)
- # hoplon (2)
- # java (1)
- # lambdaisland (2)
- # lein-figwheel (1)
- # leiningen (5)
- # luminus (4)
- # lumo (36)
- # off-topic (4)
- # om (21)
- # onyx (1)
- # pedestal (33)
- # re-frame (33)
- # ring-swagger (70)
- # spacemacs (26)
- # specter (7)
- # sql (6)
- # timbre (2)
- # untangled (12)
- # vim (3)
- # yada (1)
Can Anyone link an easy-to-understand resource on Maven? Have been reading this: https://github.com/boot-clj/boot/wiki/Boot-Environment , which uses the term extensively!
@hit023 Maven is a bit like
npm for JS, it’s Java’s package manager and has been adopted in the Clojure world too
@hit023 do you have any particular problem? Usually you don’t need to know much about Maven
Oh! No. Just wanted to know if there was anything significant to be learnt. Now I know! Thanks.
One thing that occasionally leaks through from maven are scopes: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
But there’s nothing “important to know” really (at least as far as I’m concerned 😄)
@hit023 one thing i think is good to know is how maven resolves transitive dependencies and how it deals with conflicting versions of transitive dependencies
like you can't have class
Foo from the
foo-1.2.3.jar jar at the same time as the
Foo class from the
so maven has a simple strategy for choosing which version of a dependency to use when there is a conflict
generally you will look at any dependency conflicts with
boot show -p and resolve them yourself, overriding what maven does if you need to
so you will see with
boot show -d the result of the dependency resolution process, after conflicts have been resolved
1. you can specify the desired version of the contested transitive dependency yourself as a direct dependency of your project
2. you can add
:exclusions to the "coordinates" of the direct dependency of your project that itself depends on the version of the transitive dependency that you don't want
Okay, so where does Aether fall into all this. I saw this in the repository: https://github.com/boot-clj/boot/blob/master/boot/aether/src/boot/aether.clj
Okay, so I'll look into it in the repo. Now, what is Maven Artifact Resolution ? Stumbled upon this: https://maven.apache.org/resolver/index.html . As a person understanding/contributing to boot, do I need to worry about it?
Okay. Read this http://www.braveclojure.com/appendix-a/ . But need a more comprehensive resource giving important info.
but there are many things in the POM spec that are related to maven the build tool implementation details
but one of the main affordances of the maven stuff is automatic resolution of transitive deps
so it loops over your dependencies, fetches their poms, and downloads the artifacts to your local maven repo
to do this it recursively downloads pom.xml files for the dependencies of your dependencies, and for their dependencies, and so on
so after aether has fetched all the pom.xml files for all the dependencies of dependencies
it picks the transitive dependency that has the shortest path to a dependency that you selected in your project's dependencies
oh! this: "nearest definition" means that the version used will be the closest one to your project in the tree of dependencies, eg. if dependencies for A, B, and C are defined as A -> B -> C -> D 2.0 and A -> E -> D 1.0, then D 1.0 will be used when building A because the path from A to D through E is shorter. You could explicitly add a dependency to D 2.0 in A to force the use of D 2.0 ?
Where can I see calls to the JVM being made by boot to manage filesets? Which file in the repo ? Any help/pointers would be great.
hey guys, if I have some task that uses pandeiro.boot-http/serve and it's essentially blocking, how do I call it (from command line) so it wouldn't block the repl? I know how to do in when you're already in the repl (just wrap it in a future - the way it explained in cljs-repl's readme)
@hit023 just spend some quality time snooping around the source. it's worth the trouble, in my experience
so if I have dev task like this:
how do I run it from command line and make sure it’s not blocking
(deftask dev  (comp (dev-env) (serve :reload true) (watch) (notify) (npm-install) (sassc) (reload) (cljs-repl) (cljs)))
so, if you run that task while you already in repl:
(boot (dev)) - after it done compiling, it will block the repl. If you wrap everything in a
(future (boot (dev)) - it won't
now, I need to find a way to execute it from the command line and without blocking the repl
so "blocks the repl" means what exactly? you try to eval some code and nothing happens?
damn. you got me. i'd try divide and conquer - get rid of everything after notify, then add back one by one? at least to isolate what's causing the prob.
Can you not just execute it from the command line, and use the future wrapping when running from the repl?
btw, you do grok that the boot "pipeline" is actually a circuit? i worked with boot for months before i began to grasp the significance of that.
@geoffs I certainly can, you do
boot repl and then in the repl (future (boot (dev)), but I want to do it from the command line - whole thing
currently only way to get it non-blocking - is to have it in a future. I thought I could create a task that essentially does that - wraps
dev in a future, but still can’t get it to work
I think I had it before, then at some point something changed - boot updated or maybe something else, I dunno.
The pain with doing a repl -s, is that you need another 'boot repl -c' to actually use the repl
i'm flummoxed. i do sth similar, but w/o reload and the cljs stuff. i suspect cljs-repl. 😉
that’s the thing - I use cider too, and it just works. I overlooked the fact that it works for me, but I need other people to be able to use it too
asking them to type too many things in correct order with certain time intervals - not a good way to sell boot
we'll figger this sucker out, dammit! i'm away from my machine, but when i get back i will bend boot to my will!
any chance you could share the code you're trying to run with this, so we can test?
@ag: no, i mean the code you're trying to run. maybe it's hanging? in any case we cannot reproduce without it
@mobileink it’s not “hanging” - I think it’s a normal behavior of
serve - check out boot-cljs-repl’s readme - it explicitly says to wrap dev task in a future
cljs-repl starts an nrepl, no? the readme says "To start evaluating forms in the browser you must first connect to the running Clojure nREPL server (started by the cljs-repl task above)" so you're running 2 nrepl servers?
u start with $ boot repl, which starts an nrepl server and an nrepl cli client. then you run your dev task. it contains cljs-repl, which starts another nrepl server.
@mobileink : do you want a working build.boot file to play with, or are you trying to understand each piece in great detail?
at this point i'm guessing that @ag is having a prob because of multiple nrepls. pure speculation.
here’s something I use:
(deftask dev "repl development."  (comp (cider) (repl :server true) (serve :dir "target") (watch) (notify :audible true) (target)))
Oh, yeah. There's another task for cljs-repl that doesn't start an nrepl server which is probably what you want to use
this assume that I have in ~/.boot/profile.boot:
(deftask cider "CIDER profile"  (require 'boot.repl) (swap! @(resolve 'boot.repl/*default-dependencies*) concat '[[org.clojure/tools.nrepl "0.2.12"] [cider/cider-nrepl "0.14.0"] [refactor-nrepl "2.2.0"]]) (swap! @(resolve 'boot.repl/*default-middleware*) concat '[cider.nrepl/cider-middleware refactor-nrepl.middleware/wrap-refactor]) identity)
i don’t see anything explicit about future. all i see is a very lame example that uses future for no apparent reason.
I have a boot task that says:
is there a way I can add another task to inject a repl into it?
(comp (watch) (garden ...) (reload ...) (cljs-repl ...) (cljs ...) (target ...))
try moving cljs-repl in front of watch? i dunno. cljs-repl is starting to look like a very badly designed bit of sw to me.