This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-29
Channels
- # admin-announcements (2)
- # beginners (10)
- # boot (253)
- # cider (11)
- # cljs-dev (26)
- # cljsjs (21)
- # cljsrn (7)
- # clojure (87)
- # clojure-berlin (13)
- # clojure-dusseldorf (5)
- # clojure-greece (7)
- # clojure-poland (11)
- # clojure-russia (189)
- # clojure-spec (31)
- # clojure-uk (86)
- # clojurescript (89)
- # cursive (15)
- # datavis (2)
- # datomic (57)
- # devcards (3)
- # dirac (92)
- # editors-rus (3)
- # emacs (4)
- # events (1)
- # funcool (30)
- # hoplon (3)
- # jobs-rus (6)
- # leiningen (1)
- # luminus (12)
- # mount (25)
- # off-topic (5)
- # om (43)
- # onyx (41)
- # perun (1)
- # proton (2)
- # protorepl (7)
- # re-frame (17)
- # reagent (34)
- # ring (13)
- # specter (1)
- # spirituality-ethics (1)
@martinklepsch: i'm not going to be able to make it to Europe for clojutre or euroclojure 😕
Hello everybody, a short note to users of system
to say that the latest snapshot version will act as a tools.namespace wrapper if a system is not supplied. The use case was brought up on Stack Overflow. http://stackoverflow.com/a/38625722/465458
Short demo here: https://github.com/danielsz/no-restarts
hello folks - having a boot-cljs
performance problem here and wonder if one of you can help? a work colleague of mine and me, we share exactly the same source code but on his machine the boot task to reload after changes is 20 times faster which is weird
we both have the same environment and our mac os xmachines are have very close performance characteristics
our boot cljs task starts like this
(deftask development []
(task-options! cljs {:optimizations :simple :source-map true}
reload {:on-jsload ‘abc-ui.app/init})
identity)
and here the stats:
Adding :require [devtools.core dirac.runtime] and :init-fns [devtools.core/install! dirac.runtime/install!] to app.cljs.edn...
Adding :require adzerk.boot-reload.init1173 to app.cljs.edn...
Compiling ClojureScript...
• js/app.js
Writing target dir(s)...
Elapsed time: 22.480 sec
whereas his are below 2 sec
@michael.heuberger: do you have a ~/.boot/profile.boot?
also maybe try du -sh ~/.boot/cache
, like maybe there is an insane amount of stuff cached by boot?
and you can turn on verbose output with boot -vv ...
to see what it's doing that takes so long
@micha: thanks for that - no i dont have a ~/.boot/profile.boot … should i have one?
our jvm options are BOOT_JVM_OPTIONS='-Xmx2g -client -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xverify:none XX:MaxMetaspaceSize=100m’
and we both share that together
no, i was just trying to think of things that could affect what boot does other than the project itself, which is the same for both of you
~/.boot ❯❯❯ du -sh ~/.boot/cache
228M /Users/michael-heuberger/.boot/cache
is that insane?
there is a clojurescript compiler option you can use to see where the compiler is spending its time
which is?
and are the jvm options good?
tried -vv
just now and i can see that when i change a single file, it registers all files and fires lots of events
but why does it also re-copy svg files when i only have changed one cljs file?
it does
Filesystem: copying index.html...
Filesystem: copying vectors/spark/mail_search_24px.svg...
Filesystem: copying vectors/spark/logo_white.svg...
Filesystem: copying vectors/spark/logo_soft_white.svg...
Sync complete.
Released java.util.concurrent.Semaphore@7161d8d1[Permits = 1]...
Elapsed time: 21.023 sec
`
yes, using target task
trying now
an idea for a future version?
still slow despite of removing the target task
huh? i have a new mac book
that’s what i am asking myself too
how can i narrow down the problem here?
when i set optimizations to none, then it is very fast
but not for simple
must be related to the simple optimization routine
exactly
if we both use none, then we are both equally fast
reason we switched to simple optimizations is because source maps wont work when optimizations are set to none
for local development
i ll check with him re memory
no, the do not work when having no optimizations
yes, boot cljs and dirac
hmm, weird - why does it work for me only when optimized with simple?
no, we do not use any compiler options at all
but if you go in and set compiler options then it can't help, because a lot of compiler options are related to each other in weird ways
mkdir src ; echo '(ns foo) (println "hi")' > src/foo.cljs ; boot -BP -d adzerk/boot-cljs -s src cljs target
and you can make a html file that loads the main.js
file and you'll see the source maps in the js console
ok checking ...
~/C/test ❯❯❯ mkdir src ; echo '(ns foo) (println "hi")' > src/foo.cljs ; boot -BP -d adzerk/boot-cljs -s src cljs target Downloading https://github.com/boot-clj/boot/releases/download/show/boot.jar... Exception in thread "main" java.io.FileNotFoundException: https://github.com/boot-clj/boot/releases/download/show/boot.jar at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1836) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) at java.net.URL.openStream(URL.java:1045) at Boot.download(Boot.java:173) at Boot.install(Boot.java:224) at Boot.main(Boot.java:243)
why should this make a difference?
https://github.com/boot-clj/boot/releases/download/show/boot.jar gives a 404 🙂
target/index.html
<!doctype html>
<html>
<head>
<script src="main.js"></script>
</head>
<body>
hi
</body>
</html>
can we make it easier?
i ll pull an example from github and go from there?
which one you recommend?
hmmmm, stuck
dont see what’s wrong
gotta go soon
but thanks for your feedback
maybe someone will have an idea next week?
Hello guys. I’m pretty new to boot, just thinking about migrating from lein. I see a boot as a good replacement of out current project build-system because we have multiple lein projects that depend on artifacts of each other. I want to have a single boot file to build them all in a right order. but how can I “narrow down” to some directory with updated env? subprojects have different deps, source-paths etc. Is it even a good idea to use boot in this case? how do you build different artifacts and add them to dependencies of other ones?
@jetzajac: i would still recommend making separate versioned artifacts for the separate projects
this way the projects are completely separate and there isn't a need to merge the build process
decouples the builds, in case there is some stuff you must do to build A and/or package it
perfect, I got you. But what if in order to run C i have to run A and B first? (A and B are microservices, not libs)
also in boot itself @richiardiandrea developed some great tooling around parallel multi-module builds
hey the repo looks cool, I'll have a look too
the ont thing the repo demonstrates that you're interested in is using semaphores to synchronize around dependencies
thank you guys. I see boot is so powerful that it is hard to imagine what is possible and what is difficult to achieve with it
yeah this “homomorphism” is very natural and handful too. CI, build script, IDE are all the same.
now I am spamming
sploosh, definitely a good name for something
@dominicm: unicornlaces 👍
@richiardiandrea: I'm still wondering what is the benefit of boot-cljs-devtools? Does it help with Dirac?
@juhoteperi: yes it basically adds both cljs-devtools
and dirac
at the same time
If only using cljs-devtools, looks like it needs more lines to enable than just cljs-devtools alone
in lambone I have a switch to choose either one or the other
Also, does it run devtools init code each time cljs code is reloaded or only during initial load? I found it better to only run devtools init once
Hmm. Never used Dirac but looks like the dirac option code in cljs-devtools is useful
that's a good point I think now I have it inside a watch
but as you say it might be better outside...
Also, it depends on if you are using init-fns or just require (or preloads)
it is using init-fns
atm
preloads was not out when it was originally done..
IIRC init-fns are ran each time
yeah that will change in the future...i inherited this project so that is something to do
also @juhoteperi a question, do I need to put the boot-cljs-repl
task in a watch ? because that is another thing that it's better to do once only...
@richiardiandrea: you can leave it inside watch, it has logic to run only once if no changes in cljs compiler opts
How does :checkouts
work with the REPL? If I add a dep to my checkouts
vector and run boot watch pom jar install
in that dep that I added to my checkouts vector, it seems the changes don't get pushed to the REPL. Is there something I need to do to make this work?
random question: is a pod
aware of environment variables? my instinct says no, just want to double check
Is there any way to cause boot to add multiple resource directories as separate directories on the classpath? Currently it looks like its merging them into one FileSet (the "mutable classpath"). But this isn't great for loading files that there are supposed to be multiple copies of (e.g, data_readers.clj). For example, say I have a boot environment with `:resource-paths #{"source" and "../other-project/src"}. Even though both "src" directories have a data_readers.clj file, I can only see one of them since they're getting merged into a single temp directory. Is there any way to avoid this?
@luke: I don't think there's a way around this. Although if you're loading "other-project" I assume you're also depending on the jar of that project which could import the data_readers.clj
?
but would the source dir take precedence over overlapping files? I guess it would, wouldn’t it?
@richiardiandrea: I think System/getenv
should work in pods just as usual
mmm...need to try that, I had a problem with dirac env vars in the repl
task
@luke: precedence in which way? I don't know much about data_readers.clj — is Clojure going to merge multiple of them in some way?
by “precedence” I mean having the same file in a source dir and also in a jar, and then requiring
it
ah! I'd assume source-dir takes precedence, not sure if that's correct but I think that's essentially how checkouts work