This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-13
Channels
- # beginners (14)
- # boot (108)
- # carry (6)
- # cider (28)
- # cljs-dev (107)
- # cljsrn (32)
- # clojars (4)
- # clojure (62)
- # clojure-austin (15)
- # clojure-berlin (1)
- # clojure-brasil (3)
- # clojure-chicago (1)
- # clojure-dev (9)
- # clojure-greece (2)
- # clojure-italy (4)
- # clojure-nl (1)
- # clojure-poland (2)
- # clojure-portugal (1)
- # clojure-russia (24)
- # clojure-spec (63)
- # clojure-uk (30)
- # clojurescript (123)
- # cursive (13)
- # data-science (1)
- # datascript (1)
- # datomic (27)
- # devcards (11)
- # dirac (1)
- # emacs (5)
- # events (4)
- # hoplon (27)
- # jobs (3)
- # juxt (3)
- # leiningen (11)
- # off-topic (18)
- # om (46)
- # om-next (7)
- # onyx (50)
- # pedestal (6)
- # portland-or (8)
- # proton (16)
- # re-frame (38)
- # reagent (21)
- # ring-swagger (14)
- # specter (46)
- # untangled (116)
- # vim (46)
- # yada (22)
@borkdude I needed to do something that reminded me of what you were asking previously, ie. executing code in a library without requiring anything. In short, you can use resolve
. You get hold of the Var, and then you can do what you want with it, function application (IFn), deref it if it's a reference value, etc. Of course, the definitions need to be present in the runtime when you do that.
@micha you can provide a fully namespaced Var to resolve
. No need to require the namespace as far as I can tell.
@micha Ah, OK, but that can happen elsewhere, it doesn't need to be in the namespace where you resolve the Var.
@micha I actually am piggiebacking on a Var provided by boot.core, the warnings Var, but I don't want to require it, because it would break uberjars, so I use the resolve
hack.
@micha When I run a deftask, I know that boot.core is available, so I opted for the resolve hack.
And it passes the uberjar creation process, because otherwise it throws a boot.core
not found error.
Did anybody get anywhere with persistent boot caches & clojurescript? It would be nice to have a repeated cold-restart of boot skip rebuilding cljs from scratch.
Sometimes when I navigate to a definition (M-.) with CIDER I end up in the boot cache. What could be wrong here?
Heavyweight: boot dist --help 54.41s user 22.50s system 107% cpu 1:11.71 total
There must be some sort of caching we can do to make command --help
take less than 70 seconds
How does one pass -D options too Boot? It doesn't seem to work through BOOT_JVM_OPTIONS
I'm trying to launch a Boot repl with JMX enabled, and the JMX socket doesn't get opened
BOOT_JVM_OPTIONS='-Xmx2g -client -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Xverify:none -XX:+PrintFlagsFinal -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=43210' boot repl
@alexyakushev your name always makes me think of "yak shave", which is pretty awesome
what is lein check? 😄
interesting
don't know about an equivalent boot task
Hey, can anyone expand on the last section of this? https://github.com/boot-clj/boot/wiki/S3-Repositories
I'd like to try out the aws-maven
thing, but it's not clear what I then need to put in my :repositories
key to go with it
Aha, I got it, looks like I had the pathname slightly wrong, though I didn't get any feedback
hey guys… I can’t set task-options!
for multiple tasks at once? gotta have separate call for each task?
@ag pretty sure you can: https://github.com/boot-clj/boot/blob/ac835cea8c18e926bb843e01579b86e3f30458d2/README.md#configure-task-options
also I can’t seem to be able to turn on verbose loggin for adzerk.boot-cljs
from inside the .boot file
@ag What do you refer by boot-cljs verbose logging?
@ag you have to call your task before the tasks with options you are changing but you can do multiple ones with a single call
The instructions for running boot in circleci suggest using this stanza:
dependencies:
pre:
# Could use `latest` tag instead of version number
- curl -L -o ~/bin/boot
- chmod +x ~/bin/boot
override:
# Run tests here so everything loaded by test task is cached
- boot run-tests
cache_directories:
- "~/bin”
Why even bother caching ~/bin if we’re going to curl the shim each time?
Shouldn’t we be caching ~/.boot instead?
@flyboarder when I start repl and I have task-options! already in my build.boot. do I still have to call task-options! in the repl before starting a task?
@ag no your build.boot file is already processed by that point i believe
I am still struggling to set https://github.com/clojure/clojurescript/wiki/Compiler-Options#verbose for boot-cljs
(cljs :compiler-options {:verbose true})
compiler-options
are merged, but currently options from .cljs.edn have priority
in next version task-options will have priority
So if you also define :compiler-options :verbose
on .cljs.edn with current version, that will be used
so is there an easy way not to use cljs.edn at all? What would be correct way of putting this in build.boot:
{:require [sample-routing.core]
:init-fns [sample-routing.core/init!]
:compiler-options {:asset-path "js/dev.out" :verbose true}}
There is no support for require and init-fns without cljs.edn
But to rephrase, if you don't define :verbose
option on .cljs.edn you can set it on task options
Can you paste your build.boot (at least cljs task call) and cljs.edn somewhere?
meh… it’s now working no matter where I put it… shows just this:
Compiling ClojureScript...
• js/dev.js
Sifting output files...
Writing target dir(s)...
Elapsed time: 37.131 sec
this is what I have in .boot
…
(deftask dev []
(comp
(serve)
(watch)
(cljs-repl)
(reload :on-jsload 'sample-routing.core/init!)
(speak)
(garden)
(cljs :ids #{"js/dev"})
(sift :move {#"dev.js" "main.js"})
(target)))
that’s dev.cljs.edn
{:require [sample-routing.core]
:init-fns [sample-routing.core/init!]
:compiler-options {:asset-path "js/dev.out"
:parallel-build true
:verbose true}}
I do this in repl:
(def p (future (boot (dev))))
and seeing this:
Starting reload server on
Writing adzerk/boot_reload/init27670.cljs to connect to ...
Starting file watcher (CTRL-C to quit)...
nREPL server started on port 51458 on host 127.0.0.1 -
Adding :require adzerk.boot-cljs-repl to dev.cljs.edn...
Adding :require adzerk.boot-reload.init27670 to dev.cljs.edn...
Compiling styles.css...
Compiling ClojureScript...
• js/dev.js
Sifting output files...
Writing target dir(s)...
Elapsed time: 38.633 sec
no matter where I put {compiler-options {:verbose true}}
it gets ignoredThis is working for me: https://github.com/Deraen/saapas/compare/cljs-verbose
nope… no matter where I put compiler-options - edn file, task, or task-options! the setting seems to be ignored.
Is this a reasonable change to have made?
@donaldball caching ~/.boot/cache/tmp can potentially cache lots of unncessary files
Yeah, the travis one only caches /.boot/cache/bin and /.boot/cache/lib
Is there a reason not to cache ~/.boot/cache/cache ?
@donaldball boot/cache/cache contains all the temp dirs for each project, that is all the input files and all the temp dirs for all tasks etc.
lots of unncessary files
cool, thanks, I will correct circleci to simply match the travis recommendations then
@ag Hmm yes, cider-nrepl does some \out\ redirection
@ag are you using Cljs parallel build?
I doubt options are ignored, but it is possible that output is not correctly redirected if written in another thread
Boot-cljs in fact runs the Cljs compiler inside future
so there is a good chance that that will break output redirection with Cider
Even if you don't use parallel build
oh shit… so I finally managed to see output when no parallel build and no future… but in the other buffer. in nrepl-server buffer
@ag boot-cljs future use is my first guess. Not sure if this change makes any sense, but you could try it: https://github.com/adzerk-oss/boot-cljs/compare/future-out-binding
Clone, checkout branch, boot build
and update your project to use -2-SNAPSHOT
@juhoteperi even when I start the task like (boot (dev))
it still outputs into wrong buffer
@ag How would you run lein-cljsbuild from cider-repl? doesn't it need its own lein process?
I'm off to bed, please comment on the issue if you find something.