Fork me on GitHub

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.


is there an equivalent of lein :pedantic :abort in boot?


@mpenet It is not documented, basically only in a “works for me” state, but I use this task 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


this way we can use both depending on what we like


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"
   (aot :namespace #{'my-project.core})
   (jar :file "project.jar" :main 'my-project.core)
   (sift :include #{#"project.jar"})


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


so I need to aot whatever namespaces will be invoked when running the jar?


hmh, no, just the namespace with -main


ok. thank you!


uberjar will contain Clojure compiler, and when the main namespace does require otehr ns, it will compile the other namespaces


if the jar is not an uberjar, how will this work?


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


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 a week ago 🙂


I imagine Cider has a similar workflow