This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-04
Channels
- # beginners (14)
- # boot (28)
- # chestnut (9)
- # cljsrn (18)
- # clojure (64)
- # clojure-conj (1)
- # clojure-dusseldorf (45)
- # clojure-finland (4)
- # clojure-gamedev (1)
- # clojure-greece (8)
- # clojure-italy (22)
- # clojure-russia (4)
- # clojure-spec (19)
- # clojure-uk (38)
- # clojurescript (49)
- # code-reviews (2)
- # component (12)
- # core-async (3)
- # cursive (3)
- # data-science (2)
- # events (4)
- # fulcro (394)
- # heroku (3)
- # hoplon (16)
- # immutant (11)
- # jobs (5)
- # lein-figwheel (1)
- # lumo (18)
- # off-topic (8)
- # om (11)
- # other-languages (1)
- # overtone (1)
- # pedestal (7)
- # portkey (62)
- # protorepl (1)
- # re-frame (40)
- # reagent (41)
- # ring-swagger (5)
- # spacemacs (5)
- # unrepl (5)
- # yada (12)
What's the recommended way to get a cljs repl working with emacs? If I run boot dev
boot repl -c
and (start-repl)
in the terminal, I seem to get a functional cljs browser repl in my project, but cider-jack-in
seems to call boot repl -s wait
. cider-jack-in-clojurescript
appears to call the same thing but also (somehow) also start a rhino repl. I'd like to be able to call cider-jack-in-clojurescript
and have it start my server and browser repl. Does anyone know the best way to do that?
@bmaddy You can customize the cider-boot-parameters to be dev instead of repl -s wait.
Hey, thanks for the tip on this. I still haven't gotten things working right, but I am making progress (I think).
Not sure about the clojurescript-jack-in specifically though. Don't know how that's configured.
@mpenet https://github.com/boot-clj/boot/wiki/Snippets#check-dependency-conflicts
@martinklepsch thanks
@mpenet It is not documented, basically only in a “works for me” state, but I use this task https://github.com/nha/boot-deps/blob/master/src/nha/boot_deps.clj#L159
And I keep my dependencies in a deps.edn
file. It writes the exclusions for me, keeping the latest (IIRC).
I do the same for the deps.edn file heh, it's shared between a project.clj file and the boot file
Hi! I just started toying with Boot (and new to Clojure). Quick question: what does AOT do and do I need it in my build? To “get started” I used the following build task:
(deftask build
"Builds an uberjar of this project that can be run with java -jar"
[]
(comp
(aot :namespace #{'my-project.core})
(uber)
(jar :file "project.jar" :main 'my-project.core)
(sift :include #{#"project.jar"})
(target)))
This works fine, but if I comment the (aot ...
line I get this error:
Error: Could not find or load main class my-project.core
@hmaurer AOT (Ahead of Time compilation) compiles the Clojure code to a Java class. When running the jar using java
, the Java class has to be available because java can't compile Clojure code.
@juhoteperi Ah I see, so I need to compile ahead of time the namespace containing the -main
function?
And if I do not provide an entrypoint? Can I build a jar and then run any arbitray function contained in it?
I think aot task requires the namespace option
hmh, no, just the namespace with -main
uberjar will contain Clojure compiler, and when the main namespace does require otehr ns, it will compile the other namespaces
if it is a application, you need to add clojure to classpath yourself, if it is a library, it is not ran with java directly
@juhoteperi ok; thank you!
Is it standard when working with a repl to open a repl in server mode (nrepl) then open one or more clients?
@hmaurer depends how you work. I do it in Cursive, so I can rely on Cursive's built in REPL, rather than the one from the terminal session I'm running Boot on
Mmh I see. On an unrelated note, I was looking for something like http://deps.co a week ago 🙂
I imagine Cider has a similar workflow