This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-14
Channels
- # admin-announcements (1)
- # beginners (18)
- # boot (61)
- # cljsjs (4)
- # cljsrn (12)
- # clojure (60)
- # clojure-gamedev (1)
- # clojure-russia (13)
- # clojure-taiwan (1)
- # clojure-uk (4)
- # clojurescript (62)
- # core-async (7)
- # cursive (1)
- # data-science (1)
- # hoplon (74)
- # lein-figwheel (3)
- # off-topic (3)
- # om (2)
- # other-languages (58)
- # planck (4)
- # protorepl (3)
- # reagent (58)
- # rethinkdb (1)
- # spacemacs (1)
I’m working on a plugin and would like to know if Boot offers a convenience to get the base directory of a project?
I have a task that looks like this: boot watch speak gae/make pom jar install
. here gae/make
just sifts stuff and ends with a target :no-clean …
task. the idea is i don’t want to rebuild everything, only copy the clojure source that has changed. the problem is that the stuff that was already in the target dir is not getting picked up by jar
. any way to make the pom jar install
pipeline work from the target dir?
the (.getCanonicalPath (java.io.File. "."))
option should also work, and should be equivalent
@mobileink: the target dir is completely outside of boot, there is no facility to look inside those directories while boot is running
there are no guarantees about what should or should not be in there while boot is running
if you want to do things while boot is running you can use the classpath or have a task that writes files to a tempdir that you control in a task
it is already probably as efficient as it can be, it doesn't write anything that hasn't changed
well, my build includes a half dozen or so one-time tasks that generate code. how can i avoid rerunning those in my watch task. hm, maybe a cache?
you can use the boot.core/cache-dir!
function to create a persistent cache in your task
good point, it’s the boot way of thinking which I obviously have not quite mastered! btw I got get-checkouts working, i just do a sift to put the checkout content into assets. but that puts everthing into target/ and i can’t figure out how to put it into target/foo/ . tried (builtin/sift :move {(re-pattern "(.*)") "foo/$1”})
but everything ends up with “foo” suffixed.
sth circular i guess. i’m doing ` (comp (builtin/sift :add-asset #{(.getPath (first co-dirs))}) (builtin/sift :move {(re-pattern "(.*)") "foo/$1”})`
ah, anchoring is the thing, this works: (builtin/sift :move {(re-pattern "(^.*)") "foo/$1”})
so in any case the mechanism works: watch a component module, jar and install it on change, at the same time watch the installed jar and copy it to the webapp on change. it’s a little clunky and slow but it works. so boot lets us treat gae “service” components (formerly knowns as modules) as separate apps, completely independent of the apps in which they are used. I don’t think you can do with the gradle build system.
no doubt there will be various ways to tweak performance, i’ll just be happy when i get the whole thing working correctly...