This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-09
Channels
- # beginners (22)
- # boot (80)
- # cider (6)
- # cljs-dev (5)
- # clojure (190)
- # clojure-berlin (5)
- # clojure-dev (24)
- # clojure-italy (14)
- # clojure-russia (70)
- # clojure-spec (39)
- # clojure-uk (82)
- # clojurescript (121)
- # clojurewest (1)
- # core-logic (2)
- # cursive (25)
- # datascript (186)
- # datomic (33)
- # dirac (266)
- # emacs (9)
- # gsoc (4)
- # hoplon (37)
- # immutant (34)
- # instaparse (22)
- # jobs (4)
- # juxt (6)
- # lambdaisland (2)
- # leiningen (1)
- # liberator (1)
- # luminus (5)
- # lumo (28)
- # off-topic (9)
- # om (23)
- # onyx (26)
- # other-lisps (1)
- # parinfer (39)
- # pedestal (45)
- # proton (1)
- # protorepl (10)
- # re-frame (18)
- # reagent (4)
- # ring-swagger (8)
- # rum (4)
- # specter (13)
- # test-check (14)
- # testing (1)
- # unrepl (164)
- # untangled (10)
- # yada (14)
^ nevermind, fixed on the newest WSL build
Is there a way to reuse a built-in task name in boot? For example if I want to make a task called repl
in my build.boot.
I get
java.lang.IllegalStateException: repl already refers to: #'boot.task.built-in/repl in namespace: boot.user
@pesterhazy ns-unmap
(ns-unmap 'boot.user 'repl)
(require '[boot.task.built-in])
(deftask repl []
(comp
(with-pass-thru _
(println "it works"))
(boot.task.built-in/repl)))
Welcome 🙂
the question came up because I'm thinking of suggesting a new built-in task boot run
you'd use it in either as boot run --function my.app/start-server
or as boot run --eval "(+ 3 4)"
it's kind of like boot -e
except that it can run as part of a pipeline
the reasoning is that most people end up implementing this as part of their build.boot, but then they need to learn about with-pass-thru
but one worry would be that lots of people already use run
as a task name
so that adding that as a built-in would break things for them when upgrading to a new version
I think Alan and Micha were pretty eager to not have too generic task names so people could define their own run/build etc tasks. With a different name I think this might be a good addition
i would like a boot task to do some sed
like transforms on files in the fileset - does such a thing exist already ?
@mccraigmccraig we would like to add a --update
option to the sift
task for that
so something like update {<str/replace-match> <str/replace-replacement>}
for a line-by-line update ?
ah, i guess it would need a notion of which files to target too
so :update {regex [<str/replace-match> <str/replace-replacement>]}
I've pushed a PR with a new task to call arbitrary functions/code as mentioned above: https://github.com/boot-clj/boot/pull/597
The task name I came up with is call
, which is less generic than run
and less likely to be used in existing projects.
👍 on call
I also considered do
and eval
but both clash with clojure.core in potentially confusing ways
is an option with docstring like u update FMATCH=LMATCH:REPLACE #{[str str str]} "Runs str/replace on lines of files with paths which match FMATCH"
the sort of addition to sift
you were thinking of @micha ?
i wasn't thinking string replace, was thinking maybe some kind of transformer function or something?
oh, right, so not something that could be specified from the command-line ?
yeah maybe this would be better as its own task, because then it could support positional parameters
ok, well i need something like that now - i'll have a go at it
is there a way to kill/restart a pipeline from the boot repl which is started from the command line? i.e. if I have
(deftask dev []
(comp
(repl)
(watch)
(cljs)))
1. $ boot dev
2. connect to the repl and restart dev from the replyeah, my scenario is that boot is started within a more complex setup within docker-compose, so it is running inside a docker container to work out of the box
right, but then everybody has to start the task. goal of the setup is that you just run the docker stuff and eveything is up and running. people not working on the clojure part shouldn’t have to worry about it
hey folks, boot-http/serve seems to be disabling watch. this works:
(deftask monitor
"watch etc."
[]
(comp (build)
(watch)
(notify :audible true)
(demos)))
watch as i try to use threads correctly. still having probs. also having probs with my checkouts not being reloaded.
hey there, so i don't think it disables watch, but i have had issues with static resources that have changed not being 'seen' by the resource-serving handler
there is a (sadly, >1 year old) issue for that particular bug: https://github.com/pandeiro/boot-http/issues/29
ok, thanks. i'll try to find some time to look into it. i'm also having ptoblems with boot-refresh, so i might as well look at everythin.
but if i insert (serve) just before (watch), then changes are no longer detected. what am I doing wrong?
anybody? on a related note, when i try to use https://github.com/samestep/boot-refresh
I’m wondering what level of abstraction to use for builds that involve multiple separate modules
Say I have a project that is going to be build into a macos .app bundle
And I need to generate a JAR with some jvm code, but also a directory of compiled clojurescript files
If I want to point the cljs compiler to one directory, run it, then point the jar
task to a different set of source/resource dirs and run that
Then take all this output and bundle it together
Am I stuck pulling stuff in and out of the environment with set-env!
?
I’m not sure if this is the problem pods are meant to solve
pods solve the problem of how to manage components that need conflicting versions of the same dependencies
also they solve the problem of how to isolate the dependencies of independent components that are loaded into the same JVM
That was the impression I got
someone helpfully pointed at https://github.com/boot-clj/boot/wiki/Configuring-Boot#configuring-stack-trace-display to me, to get boot stacktraces printing more in line with standard stacktraces, is there some way to disable aviso entirely?
@hiredman unfortunately no but agree it would be great to be able
was chatting with micha the other day, was probably a mistake to both bring it in and make it default
as a piece of UI it's subject to shed color churn
@hiredman @alandipert not a general solution but this pull request (https://github.com/boot-clj/boot/pull/582) will give you regular stack traces in a "bare repl":
boot repl -B
boot.user=> (require 'clojure.repl)
nil
boot.user=> (/ 1 0)
ArithmeticException Divide by zero clojure.lang.Numbers.divide (Numbers.java:158)
boot.user=> (clojure.repl/pst)
ArithmeticException Divide by zero
clojure.lang.Numbers.divide (Numbers.java:158)
clojure.lang.Numbers.divide (Numbers.java:3808)
boot.user/eval43 (boot.user5503644062414151444.clj:2)
boot.user/eval43 (boot.user5503644062414151444.clj:2)
clojure.lang.Compiler.eval (Compiler.java:6927)
clojure.lang.Compiler.eval (Compiler.java:6890)
clojure.core/eval (core.clj:3105)
clojure.core/eval (core.clj:3101)
clojure.main/repl/read-eval-print--7408/fn--7411 (main.clj:240)
clojure.main/repl/read-eval-print--7408 (main.clj:240)
clojure.main/repl/fn--7417 (main.clj:258)
clojure.main/repl (main.clj:258)
nil
I ended up with
(alter-var-root
#'boot.from.io.aviso.exception/write-exception
(constantly
(fn
([exception]
(.printStackTrace exception *out*))
([writer exception]
(.printStackTrace exception writer))
([writer exception options]
(.printStackTrace exception writer)))))
in my build.bootah yeah, i've put something like that in my profile.boot in the past also