This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-24
Channels
- # aws-lambda (1)
- # beginners (99)
- # boot (46)
- # cider (8)
- # cljs-dev (20)
- # cljsrn (37)
- # clojure (189)
- # clojure-dev (22)
- # clojure-dusseldorf (28)
- # clojure-italy (1)
- # clojure-russia (28)
- # clojure-spec (10)
- # clojure-uk (33)
- # clojurebridge (1)
- # clojurescript (64)
- # core-matrix (2)
- # css (3)
- # cursive (3)
- # datascript (34)
- # datomic (101)
- # defnpodcast (2)
- # dirac (5)
- # events (1)
- # funcool (3)
- # ldnclj (1)
- # lumo (11)
- # mount (1)
- # off-topic (95)
- # pedestal (2)
- # perun (10)
- # re-frame (3)
- # reagent (6)
- # ring-swagger (4)
- # specter (102)
- # test-check (1)
- # untangled (1)
- # vim (8)
- # yada (17)
i'll leave this here for any fans of kotlin: https://github.com/daveyarwood/boot-kotlin
inspired by / modeled after @alandipert's boot-yeti task
@dave ooh la la
Hey guys, I’m trying to speed up things here, can someone tell if it’s worth the effort? Basically boot-cljs takes ~10 secs to recompile whenever anything changes. Even a smallest change causes all the files involved in that ns to be recompiled. My impression was that with lein and figweel it would take much less than that (I might be wrong). You think something is wrong with my config/project structure?
@ag enable :verbose
and check how many files Cljs compiler recompiles after a change, if many namespaces depend on the changed namespace Cljs compiler will recompile all
@juhoteperi yes, I think that’s what’s happening, our project’s structure is not optimal maybe
In some larger projects it just can't be helped (or you could disable :recompile-dependets
but I find that can cause hard to debug problems during dev)
I have worked on projects with around 30kloc Cljs/cljc and changing some common.
namespaces would recompile the entire project and take 45 seconds
But those namespaced didn't need much changes and just changing a single view namespace only compiled like 2 files and takes 500ms
^^ this advice is gold, thanks @juhoteperi
@ag Did you enable :verbose
option? You should be seeing Compiling foo.cljs
messages
(task-options!
cljs {:ids #{"js/main"}
:optimizations :none
:compiler-options {:asset-path "/js/main.out"
:verbose true
:recompile-dependents false}}
No, that's correct
I think I have found what’s causing it. I thought this is smart - turned out to be stupid. I have a utils.clj with a macro and utils.cljs that refers to that macro (so cljs namespaces can use that macro)
I removed that - made it to 2.275s (with recompile-dependents false) from previous ~10s - still not the best, maybe I can improve that as well
by removed, do you mean you removed the file? or renamed it
I have
(set-env! :source-paths #{"src/clj" "test/clj"})
in my build.boot but i see others with just
(set-env! :source-paths #{"src" "test"})
but i get an error when i do that. (2.7.1, 1.8) What gives?"could not locate xxx__init.class or xxx.clj on classpath"
actually, i see that my source tree has an extra layer. i have "src/clj/[projectname]" whereas they have "src/[projectname]". At some point was told to arrange things that way and I've always done it that way thereafter. I'm not sure what it's buying me
Presumably the ability to mix languages in a way that I never do?
if you say :source-paths #{"foo/bar"}, and you need "baz.buz" then it will look for "foo/bar/baz/buz.clj"
correction: it will look for baz/buz.clj on the cp. that means your source must have foo/bar/baz/buz.clj.
:source-paths and :resource-paths go on the classpath, i believe. :asset-paths does not.
Yes, I had to figure out :asset-paths during Baby's First Library. Thanks for the refresher. That had completely receded into the mists of time.
Hi everyone. I'm new to Boot and having a little difficulty accomplishing something. I'm trying to get my changes in Vim automatically available in a REPL upon saving files. I've got it working manually at the moment, using a combination of
(require '[clojure.tools.namespace.repl :refer [refresh]])
(apply clojure.tools.namespace.repl/set-refresh-dirs (boot.core/get-env :directories))
boot.core => (clojure.tools.namespace.repl/refresh)
(deftask dev
""
[]
(apply clojure.tools.namespace.repl/set-refresh-dirs (boot.core/get-env :directories))
(comp
(watch)
(speak)
(clojure.tools.namespace.repl/refresh)))
java.lang.IllegalStateException: Can't set!: *ns* from non-binding thread
clojure.lang.ExceptionInfo: Can't set!: *ns* from non-binding thread
@pjullah have you see this? https://github.com/boot-clj/boot/wiki/Repl-reloading and this? https://github.com/samestep/boot-refresh
@pandeiro I noticed this is closed: https://github.com/pandeiro/boot-http/issues/56 does it mean that you can restart boot-http/serve
without having to restart the repl?