This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-07
Channels
- # admin-announcements (1)
- # arachne (1)
- # beginners (11)
- # boot (72)
- # cider (7)
- # cljs-dev (9)
- # clojure (31)
- # clojure-czech (8)
- # clojure-poland (1)
- # clojure-russia (7)
- # clojure-uk (17)
- # clojurescript (48)
- # community-development (5)
- # cursive (2)
- # data-science (1)
- # datascript (3)
- # datavis (1)
- # datomic (4)
- # devcards (45)
- # docker (3)
- # hoplon (5)
- # keechma (3)
- # lein-figwheel (1)
- # leiningen (4)
- # luminus (16)
- # off-topic (1)
- # om (2)
- # om-next (1)
- # onyx (4)
- # other-languages (104)
- # overtone (1)
- # re-frame (2)
- # reagent (37)
- # rum (35)
- # untangled (4)
- # yada (4)
@alandipert: thanks for your answer to my second question. I should have made my first one clearer: Let's say I have a Boot pipeline of three tasks: A, B, C. Most of the time all of them work, but at one point of development B throws an exception. Will C still get called?
then if the REPL task is after another that throws exception, then will (load-file ...)
work?
hmm, maybe I mess things up, REPL should starts it server instance instead of being inside a pipeline life cycle
oh, usually what i do is boot repl
, then at the repl to run the build i do (boot (A) (B) (C))
since the repl isn't really part of my build, it's just a way for me to direct the build
so things like boot dev
is not recommended?
i think in most cases it's fine
anyway it's good to develop different workflows, i definitely use boot differently depending on the kind of application
hmm, if a task before boot-cljs-repl
throws exception, then boot-cljs-repl
should hang, no?
i'm not sure exactly how cljs repl works, but the builtin repl starts up when the task is constructed, and is a no-op when the fileset gets passed
the repl has always been a weird thing to think about in a pipeline, it doesn't really fit the idea
since its purpose is to facilitate interaction NOT via the fileset
so it's not clear to me how the repl should behave in that circumstance
yeah, it's the repl in pipeline context that confused me, not Boot pipeline itself
so build.boot with REPL tasks should be like this:
(start-repl-server) (start-cljs-repl-server) (boot (notify-repl-server) (notify-cljs-repl-server) ...)
any idea?
hm, i just had a thought
kind of inspired by the way you have symmetric tasks
so the REPL isn't a good fit for boot builds because it's a separate pipeline
but what if we decomposed the REPL pipeline into parts and made each a boot task
so instead of an nrepl client, we have a task that listens for expressions and runs the build pipeline with that form added to the fileset
and then later in the pipeline, a separate task that evaluates it in the right context
i guess really the "repl" could be a program that writes code to your source dirs
and then all the normal boot/watch stuff is responsible for eval
exactly
that's what I feel missing
eval in the pipeline context!
i have to go but if you have any other thoughts on this i'm very interested to hear them
this is how i do cljs personally, i haven't used a cljs repl since 2012
live reload ftw
this would line up repl experiments with the actual app environment also, no context switch
source of many problems and misunderstandings
it's like Lisp & Boot have it all but we mess 'em up
well i'll see you later, thanks for stimulating discussion
haha yes
I am rewriting a lein project in boot, and I am having some trouble moving over some code that ran my datomic migrations.
Before, I simply passed a sorted list of each migration filename to the conformity read-resource
to get back the tx data, that was then passed along to ensure-conforms
which transaced the data.
Each migration is in resources/migrations directory.
It seems that (
is returning nil despite the file being valid and in the resource dir.
@kenbier: if I remember correctly io/resource
is used for fetching within jars, what I usually do for targeting both repl and jar is:
(or (io/resource "version.properties")
(io/file "version.properties"))
then slurp
or io/reader
passing in just the filename in the lein repl worked but in boot it doesn’t. so im going to try passing in the path relative to resources/ and see if that makes a difference
if you have it in the resources
you should see it on the classpath under /
if you do boot show -f
you can also see your fileset
and see where it is/will be placed in the uberjar
(it can be big to display though, so a grep is good there)
migrations ├── 1453359339862_navi-app-schema.edn └── 1453359390119_navi-app-data0.edn
so in lein my resource path looked like this: :resource-paths ["resources" "resources/migrations"]
yes that should be the same as in boot
that concept actually comes from maven
well it complained about the files overlapping, so my resource-path is just [“resources”]
if you put stuff in resource-paths
in both boot and lein
you will see them in /
so now in boot you have only resources
, therefore the content is mapped to /
this is why you see them under migrations
btw if you are using ragtime
I suggest you to have a look at boot-ragtime
ah not with datomic, only postgres