This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-02
Channels
- # aws-lambda (1)
- # beginners (28)
- # boot (54)
- # cider (11)
- # clara (28)
- # cljs-dev (74)
- # cljsrn (13)
- # clojure (342)
- # clojure-austin (3)
- # clojure-dusseldorf (4)
- # clojure-france (2)
- # clojure-greece (11)
- # clojure-italy (42)
- # clojure-poland (7)
- # clojure-russia (11)
- # clojure-spec (44)
- # clojure-uk (156)
- # clojure-ukraine (4)
- # clojurescript (102)
- # cursive (17)
- # datascript (19)
- # datomic (17)
- # dirac (39)
- # emacs (22)
- # funcool (56)
- # hoplon (25)
- # jobs (3)
- # jobs-discuss (31)
- # leiningen (2)
- # luminus (4)
- # lumo (3)
- # off-topic (47)
- # om (51)
- # onyx (57)
- # re-frame (13)
- # reagent (57)
- # remote-jobs (15)
- # ring (9)
- # ring-swagger (7)
- # robots (2)
- # rum (6)
- # specter (16)
- # sql (7)
- # test-check (37)
- # untangled (7)
- # yada (5)
Hello folks, is anybody using with-cp
? Can you confirm it does not include :source-paths
?
summoning @micha ^ ๐
yeah it seems like it does not
https://github.com/boot-clj/boot/blob/master/boot/core/src/boot/task/built_in.clj#L350
@micha do you think an option is preferrable so that we don't break the current "jars-in-jars-out" behavior?
I create cp
for working at the repl
and without src
is a bit tough ๐
has anyone used mount with boot-reload in cljs? i'm hitting an issue where on reload, mount throws a very cryptic error: Uncaught could not start [#'myapp.ui.core/ui] due to TypeError: Cannot read property 'cljs$core$IFn$_invoke$arity$1' of null
the stack trace in the dev console only points back to the defstate
where that var is defined
I think I'm just gonna ditch mount on the frontend; it's not doing much that a simple start
, stop
and reload
set of functions couldn't do
@pandeiro here is an example of the boot project with mount and (reload)
: https://github.com/tolitius/hubble
the error you posted is most likely not related to mount, and comes from the :start
function of #'myapp.ui.core/ui
@tolitius Thanks, you're right. I've tracked it down to how I'm trying to unregister re-frame handlers in my :stop function; something I was doing there prevented the :start function's registering of handlers
Btw @tolitius is mount
self-host compatible? (And how much work would it be to make it so?)
Question for you guys: Is there a way to define private tasks like private functions? I have a number of tasks that always rely on calling another task but I canโt figure out how to (comp) that task within the task definition. For example, this is what Iโm currently doing:
(boot/deftask PRIVATE-reset-and-seed-database!
[e environment VAL kw "Environment to use #{dev production}"]
(fn [next-task]
(fn [fileset]
(reset-and-seed-database-fn environment)
(next-task fileset))))
(boot/deftask reset-and-seed-database!
[e environment VAL kw "Environment to use #{dev production}"]
(comp
(wordroot-util/data-readers)
(PRIVATE-reset-and-seed-database!
:environment environment)))
I want to just have something like:
(boot/deftask reset-and-seed-database!
[e environment VAL kw "Environment to use #{dev production}โ]
(comp
(wordroot-util/data-readers)
(fn [next-task]
(fn [fileset]
(reset-and-seed-database-fn environment)
(next-task fileset))))
Anything obvious Iโm missing?You can try putting the meta ^:private
between deftask and name
If I remember correctly they won't show up in the help @chooie
Perfect - thanks @richiardiandrea!
Hi all, if I start embedded jetty server - watch and sass tasks are not working
(deftask build-dev []
(comp
(watch)
(sass)
(aot :namespace '#{blog})
(target)))
(deftask server []
(build-dev)
(blog/-main))
where -main starts Stuart Sierra component:
(defn -main [& args]
(component/start (system)))
which is basically pedestal + datomic
If I remove (blog/-main) from build-dev - watcher works, but no Jetty started. Otherwise - filewatcher not working (no sass compiled)PLease advice, how can I fix this?
server needs to be wrapped in comp
oh well not exactly
you should have a separate task that starts the server
something like this:
(deftask start-server [] (let [d (delay (blog/-main))] (with-pass-thru [_] @d)))
(deftask server [] (comp (build-dev) (server)))
works!
thanks
the problem is that boot has two stages
Can you please advice where I can more info on with-pass-thru? (shall i just google?)
the pipeline construction phase, and then the execution phase
the task constructor can do some work, like setting up resources
but this is only done once and before the tasks are actually executed
other than setting up resources, the constructor also returns a function, which is the actual workhorse of the task
with-pass-thru is just a thin wrapper around returning a fn (and keeping the fileset as it is)
i see...
thanks a lot
this comes up a lot, I'll add a snippet to the wiki
it would be helpful
@richiardiandrea, you mean whether it is .cljc
and works in the same way on jvm and js?
@tolitius no I was wondering whether it would run in JavaScript with no JVM, macros are positioned in a slightly different way for it to work: http://blog.fikesfarm.com/posts/2015-06-19-portable-macro-musing.html
I will have a look as well
@richiardiandrea yes, it does work in JavaScript with no JVM. in cljs
case, because :advanced
compilation mode renames and shuffles all the ns
s, it works via a "derefable" state: https://github.com/tolitius/mount/blob/master/doc/clojurescript.md#managing-state-in-clojurescript (i.e. you @
a state when you need to use it)
@tolitius that's great, gotta try with lumo
then
@richiardiandrea this is exciting ๐ let me know how it goes
@tolitius wait until I'll bug you with issues ๐