This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-22
Channels
- # admin-announcements (22)
- # boot (109)
- # cider (119)
- # cljs-dev (19)
- # clojure (181)
- # clojure-berlin (3)
- # clojure-dev (10)
- # clojure-japan (10)
- # clojure-korea (2)
- # clojure-russia (105)
- # clojure-sg (1)
- # clojure-spain (2)
- # clojurescript (53)
- # code-reviews (2)
- # core-async (4)
- # datomic (2)
- # editors (21)
- # instaparse (5)
- # jobs (1)
- # ldnclj (12)
- # off-topic (2)
- # onyx (146)
A (hopefully) simple boot question: What is the idiomatic way to just install the projects dependencies? So the equivalent to lein deps
basically. I need this in a build pipeline and so far I am just using boot
. That works, but also prints the help text, which I would like to avoid.
@nblumoe: you can get a list of all available tasks using boot -h
, looking at that list there seems to be no task specifically for that.
I could use any task, but I am quite surprised, that there is not a simple task to just install the dependencies?!?!
@nblumoe: you want this to prefetch stuff for things like docker images I assume?
I understand that it’s somewhat surprising. Best I can offer right now is boot repl -e '(System/exit 0)’
Still prints some stuff though.
yeah, well I can work around this easily of course or just live with the output from boot
. I was just wondering if I am too stupid to find this task.
@nblumoe: I think another way to do it would be just adding an empty task to your build.boot
file and running it
I haven’t needed it myself but given how simple the implementation is it’s probably worth adding to remove some Leiningen > Boot friction
Ok, going to open an issue on github. Not sure yet how to get this into the built-in boot tasks cleanly
There’s a namespace boot.tasks.built-in or so
Everything in there is referred by default
yes, I found the tasks: https://github.com/boot-clj/boot/blob/516f18648c2a7a5a849145163c5b7463c3c4ae62/boot/core/src/boot/task/built_in.clj
however, seems a bit intimidating to be honest. wasn't planning to invest too much time into this. especially if someone else can add such a simple thing probably in 5 minutes or so
@nblumoe: sure, opening an issue is perfectly enough — maybe there also is a way I’m not aware off
I'm starting a new project with a frontend (cljs) and backend (clj) component. How should I separate these for boot so that I don't have the cljs dependencies in my clj project?
@petrus: you can either make them two different projects or you have a task that calls set-env!
prior to cljs compilation, adding the required cljs deps
OK, thanks. Two separate projects seems cleanest.
Yes, I also prefer that approach. It might add some friction though. Is backend API only?
yes, @martinklepsch. Does boot have a boot new
command to make a clj project from a template yet?
@petrus: for the frontend project I could offer Tenzing: https://github.com/martinklepsch/tenzing 😛
thanks, I already use it
Nice. Let me know if you have any feedback/suggestions
Ah, since you're the author: I always end up adding a prod task and taking (speak) out of build because if fails on boxes without audio. I also add a lein-generate task to make a project.clj file for Cursive, but that's probably not something you want to clutter the project with.
petrus: speak fails with an exception on boxes without audio? or it just doesn't speak?
e.g. on CircleCI. The build fails on boxes without audio hardware.
my feeling is that the "convenience" tasks like speak should just print a warning "can't make sound" or whatever but shouldn't stop the build
martinklepsch: i'm a little hesitant to add (deftask deps [])
to boot because deps
is too choice a name to throw away like that
the deps
name should probbly be reserved for the user in cases where deps need to be resolved in some special way
@petrus: lein-generate is something I have in profile.boot
ah, didn't know I could do that
where does profile.boot live? ~/.boot ?
There’s also this: https://github.com/boot-clj/boot/wiki/Using-Boot-in-a-Leiningen-Project
Probably a good idea to add a cursive page to the editors section in the wiki
later everyone, gtg
I'm porting a Leiningen project to boot, and getting a really strange error when I try to run any boot task, even an empty task:
clojure.lang.ExceptionInfo: Wrong number of args (4) passed to: StringReader
data: {:file "abnf.clj", :line 186}
clojure.lang.ArityException: Wrong number of args (4) passed to: StringReader
these are my dependencies:
'[[org.clojure/clojure "1.7.0"]
[ring "1.4.0"]
[compojure "1.4.0"]
[http-kit "2.1.19"]]
ah, I'm missing boot.properties
instaparse is sniffing the classpath for the presence of a certain inner java class to determine the version of clojure
yay! works. this has bit me several times now 😕
Hm, now I have a different bug, although I'm not sure if it's boot-related, but running my boot dev
task exits immediately.
The boot dev task looks like this:
(deftask dev
"Start internal httpkit server for development."
[]
(with-post-wrap fileset (server/run (dev-handler))))
which should run this http-kit server:
(defn run [handler & [port]]
(defonce ^:private server
(let [port (Integer. (or port 3011))]
(print "Starting web server on port " port ".\n")
(run-server handler {:port port})))
server)
Is there something in boot that could be billing this task when it started?so they will all normally return and start any long-running processes in another pod or thread
when I run boot dev wait
it just waits - nothing seems to happen. Server doesn't start.
sorry I'm still a boot n00b
no change 😕 still waits. Can I drop the with-post-wrap, or will I lose reloading?
Woot! It works. Thank you, @micha!
Now if I could just get it to auto-reload changes in my .clj files
with-post-wrap passes the fileset to the next task, then evaluates the body with the fileset bound to the result of that
:thumbsup: gotcha
got reloading working YES
so cool
I'm getting a weird error on a boot project:
WARNING: ->t8090 already refers to: cljs.core/->t8090 being replaced by: cljs.core.async/->t8090 at line 141 file:/C:/Us
ers/Patrick/.m2/repository/org/clojure/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/cor
e/async.cljs
WARNING: Wrong number of args (3) passed to cljs.core/t8090 at line 141 file:/C:/Users/Patrick/.m2/repository/org/clojur
e/core.async/0.1.346.0-17112a-alpha/core.async-0.1.346.0-17112a-alpha.jar!/cljs/core/async.cljs
Any clues what might be causing this?On a different project I get the same warning but involving pprint instead of core.async.
@micha @petrus I think the instaparse classpath problem was fixed in version 1.4.1: https://github.com/Engelberg/instaparse/blob/master/src/instaparse/cfg.clj#L161
@aengelberg: great news, thanks! that would fix the issue
Cool. Since it's depended on transitively by Compojure, @petrus might want to override it in project.clj
and the errors you get are cryptic when you have a version mismatch, error like what you see there
i'll throw in that it looks like the dynamically-generated constructor for a dynamically-generated record
like something that would be an implication of (defrecord ~(gensym "t") [...])
somewhere