This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-11
Channels
- # beginners (2)
- # boot (97)
- # cider (58)
- # cljs-dev (10)
- # cljsrn (7)
- # clojure (79)
- # clojure-austin (4)
- # clojure-brasil (1)
- # clojure-france (1)
- # clojure-russia (42)
- # clojure-spec (12)
- # clojure-uk (22)
- # clojurescript (150)
- # clr (1)
- # conf-proposals (7)
- # core-matrix (2)
- # cursive (4)
- # datomic (9)
- # jobs (2)
- # klipse (28)
- # leiningen (3)
- # lumo (8)
- # nrepl (1)
- # off-topic (28)
- # om (18)
- # om-next (2)
- # perun (17)
- # planck (9)
- # rdf (1)
- # re-frame (18)
- # reagent (7)
- # ring (2)
- # rum (1)
- # specter (11)
- # test-check (3)
- # untangled (1)
- # yada (7)
thank you, will check it out
Saw Elm package documentation today http://package.elm-lang.org/packages/elm-community/elm-datepicker/3.0.0/DatePicker. It looks great
Is there a way to call set-env!
without causing any side effects? I want to set the boot env and update certain values in my :dependencies
before actually causing the call to aether. I realize I could just re-write the set-env!
function but I'd like to reduce code duplication 🙂
@kenny I am doing exactly that in lambone
and in my data oriented approach https://gist.github.com/arichiardi/7e4c430ff4ead706392f22e77c85b16a
I will have to make it available somewhere
Well, that seems like it is avoiding the problem by creating a DSL - I'd think you'd effectively have to write your own version of set-env!
.
@kenny yep exacly, but I call set-env!
only when the task is called in order to avoid multiple state changes
yep I have it here, I have to put it somewhere, didn't have time to make order...probably this weekend I will PR bootlaces
it's 4 macros and some specs
no but let me send you a PM
@richiardiandrea Out of curiosity, what was the primary motivation for making this? Was it because every call to set-env!
could result in a side effect?
no mainly reusability of the configuration
I like the way you can manipulate that map
and in complex projects it is cleaner imho
Ah. It reminds me of that dependency grouping boot project someone wrote, only this takes it up a notch to include all of Boot's configuration.
Why would someone use this over a library that has functions which call set-env!
on the reused pieces? Won't creating a DSL result in the same problems you run into with lein?
@kenny yes in a way and no in another, having declarative conf is not bad per se, what lein
is failing at is pluggability
boot has this covered pretty well, and with my defedntask
you can now have a more declarative approach like lein
also one of the biggest pain points with Cursive, for instance, is to know where to get the dep vector and paths
in this case, you can pass the var containing the conf and Cursive can read from there
all the above ^ will need abundant feedback from anybody interested in improving things a bit
Do the tasks compose well? If the task options in the map are set via task-options!
then that would affect the global state which may not be what you want when composing tasks.
yep, that's transparent to my macro
which is only re-organizing forms
I mean task-options!
can always be overridden iirc by tasks, but you would need it less, as your "default" options will end up being in a shared conf
why is my 1 file aleph http handler no file datomic db system taking 40 secs to boot in my clojure boot setup? and the process is taking 1gb of ram here's my task
(deftask dev []
(comp
(environ :env {:http-port "3000"
:db-uri "datomic:"})
(watch)
(system :sys #'dev-system :auto true :files ["handler.clj"])
(cider)
(cljs-repl)
(reload)
(speak)
(cljs :source-map true
:compiler-options {:parallel-build true
:compiler-stats true})
(target)))
the cider task is to boot cider nrepl so I can refactor while in nrepl
The cider middleware takes a lot of time to bootstrap, also maybe you don't need target at the end unless you want to dump the fileset
For boot-cljs, how does one write a file to an alternate location, by just passing in cimpoler opts (like :output-dir
)?
https://github.com/clojure/clojurescript/wiki/Compiler-Options#output-dir
I want to avaoid having extraneous <file>.cljs.edn files lying around. https://github.com/boot-clj/boot-cljs/wiki/Usage#multiple-builds
i think my trouble after upgrading cljs to .473 are rather related to boot(-reload/-cljs/-???) than cljs itself
i have an resources/js/app.cljs.edn, but i'm not even sure any more how/why it worked before 😄
does it say compiling js/app.js?
you could look at boot -v
to see if the file gets generated
or try boot cljs target
, which writes to a directory so you can inspect yourself
CLJS options:
{:asset-path "js/app.out",
:output-dir
"/home/fossi/.boot/cache/tmp/home/fossi/projects/tassenfinder/f05/np8ovp/js/app.out",
:output-to
"/home/fossi/.boot/cache/tmp/home/fossi/projects/tassenfinder/f05/np8ovp/js/app.js",
:main boot.cljs.main1791}
there's also show -f
to see what gets generated
current boot-cljs might have a bug in error reporting that will silently ignore some Cljs compilation errors
2.0.0-SNAPSHOT should fix those problems, but I have had some problems with it in work projects which is why I haven't yet released it
so nice to be at this point in my toolchain again where i don't even know how basic things work XD
you could try running the cljs compiler manually
or try a minimum file to see if you can reproduce
I have tested 472 with Saapas project and it worked
maybe worth looking at boot show --pedantic
maybe try setting BOOT_VERSION?
ah no strike that
BOOT_CLOJURE_VERSION
you can even do that in a deftask
can you post a minimal example?
also the sections in build.boot and cljs.edn may be relevant
removing the .edn doesn't change anything (apart from the generated name for the temp file)
strange
what if you use a super minimal core.cljs? like only the ns declaration
I mean does that work with boot-cljs?
try boot -BP -s your_src_dir cljs target
you may also need to add the resource dir so it finds your edn.cljs file
IMO better to have an explicit cljs.edn file
explicit > implicit
cool and now see if it breaks with latest cljs
let the caffeinated bisection begin