This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-23
Channels
- # beginners (55)
- # boot (37)
- # braid-chat (1)
- # chestnut (3)
- # cider (4)
- # clara (22)
- # cljs-dev (54)
- # cljsrn (3)
- # clojure (114)
- # clojure-italy (12)
- # clojure-losangeles (3)
- # clojure-portugal (1)
- # clojure-russia (1)
- # clojure-spec (30)
- # clojure-uk (67)
- # clojure-ukraine (1)
- # clojurescript (101)
- # core-async (11)
- # cursive (6)
- # data-science (27)
- # datomic (8)
- # figwheel (3)
- # fulcro (59)
- # graphql (2)
- # hoplon (89)
- # jobs (3)
- # jobs-rus (1)
- # leiningen (3)
- # lumo (19)
- # off-topic (9)
- # om (48)
- # pedestal (2)
- # portkey (4)
- # protorepl (19)
- # re-frame (13)
- # reagent (38)
- # remote-jobs (1)
- # ring-swagger (4)
- # spacemacs (10)
- # specter (2)
michael.heuberger that's unusual, how long ago did you install boot?
Is there any way for boot show -d
to show the dependencies included from your profile.boot?
@kenny usually it shows them iirc
It definitely didn't for me. I kept getting classpath conflicts and realized I had been messing around with my profile.boot and left some deps in there that should not have been there.
cpmcdaniel one way is you can :exclude org.clojure/clojure from your deps
@cpmcdaniel boot show -p
And another way to is add clojure as first dep on the project
(set-env! :dependencies '[[acme/foo "1.0.0"]] :exclusions '[org.clojure/clojure]) is an example of the :exclusions way
We've actually set Clojure and ClojureScript as global exclusions so we don't have to add lots of specific exclusions on other dependencies:
(set-env! :exclusions ['org.clojure/clojure
'org.clojure/clojurescript])
hmm, still shows me one of the two conflicts
the 1.2.0 one
do I need to pin my project to 1.8.0?
Boot sets the Clojure version at startup, independent of your project (which is different to Leiningen).
So that message is saying Boot is using 1.8.0 but something you're depending on from somewhere is pulling in 1.2.0.
Do you have any dependencies added via your profile.boot
?
that was it. Thanks!
Is there a way to call a boot task with the options set in a map? e.g. (apply my-task opts)
.
kenny that should just work, does it not work for you?
No. I get a java.lang.ClassCastException: clojure.lang.MapEntry cannot be cast to java.lang.CharSequence
with:
(core/deftask test-task
[a apple VAL str ""]
(println (str "I like " apply)))
(core/deftask parent-task
[]
(apply test-task {:apple "apples"}))
(apply println {:a 1 :b 2})
;; [:a 1] [:b 2]
(apply println (flatten (into '() {:a 1 :b 2})))
;; :a 1 :b 2
and (apply println (mapcat identity {:a 1 :b 2}))
the mapcat
solution is one I usually use
Is there a dynamic var, similar to *opts*
, that has a set of all the allowed keywords a task can be passed?
yup - which you should be able to do inside the task body, since it gets defined and the meta added before the task would be run
Is there a way to make boot an acceptable tool for building command line tools? I’m under the impression that takes 4+ seconds on a modern machine to launch boot because it depends on clojure core. I’m curious what it would be like to extend the boot abstraction/tooling to work ontop of Node. Which might be what this probject is already trying to do. https://github.com/gfZeng/cljs-boot I really like the abstraction that boot provides and i’m guessing i would prefer it over other tools i have used in the past (Rake, Python Click) to build command line tools. But i would need it to be able launch quickly in order to be useful!
drewverlee i don't think boot can really be used for anything you want to start up quickly, because of clj startup time + pods
Thanks alan, It looks like my idea was a candidate for google summer of code: http://clojure-gsoc.org//project-ideas/ I’m linking it because maybe the GSOC proposal is more clear about the idea then i was.
one distant possibility is some kind of boot-daemon/client situation but afaik nobody's worked on that much
@drewverlee I think it depends on your tolerance for "lag" time -- many of the processes I have powered by Boot take more than four seconds to run so the startup time isn't really an issue.
@drewverlee you could check out thew new clj
thing, but as soon as you add bigger deps things will inevitably get slower 🙂
What do you mean “new clj thing”? Do you think the times would get to slow if boot abstraction was compiling to Node and using Node libs?
Thanks for the comments! I’ll need some time to understand them. Maybe i dont understand the core purpose of boot enough. The features of it that i think are applicable to building command line tools are related to the task pipelines. Which seem way more flexible and compossible then what i have seen in other languages. I suppose i saw that as the key part of boot and the “build tool, maven stuff” as things you could attach to it.
there is a correspondence between tasks that's accessible from the cli, and is high a fidelity as possible... but working at the cli repeatedly just isn't pleasant. and so most of the leverage comes with keeping a REPL open and running (boot ...) repeatedly instead of calling boot