This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-02
Channels
- # admin-announcements (1)
- # alda (3)
- # beginners (28)
- # boot (155)
- # braid-chat (8)
- # cider (22)
- # cljs-dev (46)
- # cljsrn (24)
- # clojure (94)
- # clojure-belgium (23)
- # clojure-czech (2)
- # clojure-germany (7)
- # clojure-greece (12)
- # clojure-india (1)
- # clojure-japan (1)
- # clojure-russia (118)
- # clojure-spain (18)
- # clojure-spec (40)
- # clojure-sweden (19)
- # clojure-taiwan (4)
- # clojure-uk (5)
- # clojurescript (185)
- # clojutre (10)
- # community-development (5)
- # core-logic (11)
- # css (5)
- # cursive (7)
- # datomic (5)
- # dirac (6)
- # emacs (2)
- # euroclojure (1)
- # events (5)
- # hoplon (355)
- # instaparse (3)
- # jobs-rus (5)
- # lein-figwheel (2)
- # leiningen (5)
- # mount (11)
- # off-topic (8)
- # om (20)
- # onyx (10)
- # other-languages (87)
- # perun (9)
- # proton (1)
- # re-frame (21)
- # reagent (16)
- # specter (28)
- # tmp-json-parsing (5)
- # untangled (19)
- # yada (43)
How does one package a cljs library and publish it to clojars with boot? Clj applications make sense - make a jar, publish that - but I can’t seem to find any good info on the cljs equivalent
I’m trying to port an existing lein project to boot, and everythings working great, I just need to swap out lein release
🙂
deploying clojure or clojurescript to clojars is the same process
build a jar, upload to clojars
for example, I’m trying to write codox documentation to a top level directory (outside of the build)
if I run boot codox target -d “codox”
I get all of my resources copied over, as well as the generated codox code
Ideally I’d like to just take the fileset commited by boot codox
and write that to a new directory
@bendy: You can use the sift task to filter stuff from the fileset, take a look at the include & invert options
I could output all the files to a single directory, then sift out that directory, but then I’d be left with something like codox/docs/*
(sift :move ...)
🙂
what cljs (with reloading, ideally also repl) templates do people recommend?
uhm, tenzing? 😛
obvi!
works like a charm
added a brief thing at the end here: https://github.com/boot-clj/boot/wiki/Filter-dependencies-on-pods
how about this kind of thing:
boot.user=> (macroexpand '(pipeline (bump-version :rel-ver "1.1.1") (comp (pom :classifier "rpc") (jar))))
(boot.parallel/runcommands :commands ["bump-version --rel-ver 1.1.1" "pom --classifier rpc -- jar"] :batches 1)
if yo want to parallelize I would count the number of "commands" and then set :batches
accordingly
but it looks an awesome addition to boot.parallel
oh man, I have been craving for this for long time 😉
I think also that you can extract the "transforming" functionality and add it to boot.core
or boot.utils
depending on what Micha likes more
Does anyone know of a particular reason why c.t.n/refresh
doesn’t work in the boot.user
namespace?
it seems to work in other NSes
@richiardiandrea: re you comment on the pods page: If you could pass tasks a "fake env" that is constant that would also solve your problem no? You said a few times "task execution" time but from what I read task creation time is fine — you just want to avoid changing the user's env.
Does that sound right?
yes well, all the tasks at the moment are using get-env
(and modify it if necessary)
for fetching deps
but in my case I don't have the set of deps until the task is executed
because a user can pass a flavor, e.g. boot dev -f frontend
but this is task creation time, not execution time? creation = (build); runtime = ((build) fileset) if that makes sense
yes sorry it is creation time
thanks
and in fact I do a set-env!
at creation time to set the deps
yeah, so with that in mind env/deps could be a constant, ie. there's no need for a function that returns deps based on the time the task is run at or whatever
that's right
just want to avoid overriding the "global" classpath
I know, it is a workaround
or you get nondeterministic behavior with tasks that may run your task more than once or repeatedly
it does not bother me too much because set-env!
is called twice in the dev
task only atm
but I know it is bad 😈
is env
part of the fileset?
so meta on the fileset?
> basically the state used by the task when it runs should come from the fileset only so that's not really true right? — err misread, at run time it is
so basically the convention we need to change is: don't take the env from get-env
but from the fileset somehow?
@richiardiandrea: just wondering, in the case of lambone, if you had edn files that describe frontend/backend deps wouldn't that help?
mmm...well the problem is not where they come from but how boot-cljs
reads them
at the moment it uses get-env
ah yeah, right... 😄
yes exactly
so we should find a way to read them from somewhere else
maybe a task option
I see it is a convention problem
not implementation
so the previous task needs to populate boot.pod/env
and boot-cljs
reads from it
ah right
@micha let me try to summarize: it would be nice to shadow the global env to better separate multiple apps running in the same boot pipeline. This shadowing is only needed at task creation time, not run time.
would that affect get-env
?
no yes, it is shadowing so it should not touch get-env
agree with the above
@micha and tasks should use boot.pod/*env*
instead of get-env
in that case y?
I like the explicitness of (make-pod (get-env) ...)
This could be a big deal. I'm still running 4 JVMs occasionally because I have to run 4 services locally for dev.
oh noes!
I specifically tried to avoid this in lambone
#C0LT8HJ67 lol
boot can do it !
I gotta run but someone should put this stuff somewhere 😄
(open an issue probably)
@martinklepsch: In some cases I run mock services using Component inside the main system
A system itself is a component so it is easy to embed systems inside systems
Obviously this works only if the dependencies are shared etc. so they can be run inside the same classpath
@dm3: doesn’t work after changing x
:
boot.user> cc/x
2
boot.user> (repl/refresh)
:reloading (my-ns.core)
:ok
boot.user> cc/x
2
boot.user>
Thanks!
is it possible to start boot-cljs-repl/cljs-repl
only as server?
looking at the boot-cljs-repl
source, what I might want to do is to just create the repl-env
and then connect to it manually. But I’m unsure where I should do it
@anmonteiro: What are using repl with?
You can pass repl-env to for example Vim-fireplace
I’m using emacs / CIDER
I wanna be able to switch between CLJ/CLJS REPLs in the CIDER REPL buffer
I’m not sure if this is possible though
Have you tried the example in readme?
my use case is a bit different
(I think)
@juhoteperi: let me try to explain: I have a CLJ REPL started by cider-jack-in
In it, I run a boot task that compiles my CLJS (and I store it in a future)
I wanna be able to start a CLJS REPL that connects to that compiled CLJS
and close it when I want to go back and edit CLJ code
I’m not sure if this is possible at all. Maybe I should start by seeing if it’s possible to connect to the nREPL server started by the boot-cljs-repl
task
not sure how cider handles that, but without cider just starting the server is the default behavior
@micha: got it, so I probably still need a way to change REPL connections
thanks
I believe you can connect to nrepl started by Boot and use that same connection for both clj and cljs
cider-connect
maybe?
@juhoteperi: I can definitely do that, but that would mean I need a terminal where I run the boot command
in a perfect world I can just do cider-jack-in
Having a terminal seems much better to me 🙂
Maybe some Emacs users have better tips
I’ve never needed a terminal to develop Clojure after I started using Emacs