This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (7)
- # announcements (11)
- # beginners (76)
- # boot (3)
- # calva (139)
- # cider (24)
- # clara (2)
- # cljdoc (11)
- # cljs-dev (90)
- # cljsjs (1)
- # cljsrn (3)
- # clojure (98)
- # clojure-austin (2)
- # clojure-brasil (2)
- # clojure-dev (16)
- # clojure-europe (3)
- # clojure-italy (55)
- # clojure-nl (37)
- # clojure-sweden (11)
- # clojure-uk (40)
- # clojurebridge (1)
- # clojurescript (107)
- # core-logic (10)
- # cursive (34)
- # data-science (9)
- # datascript (19)
- # datomic (48)
- # emacs (6)
- # figwheel (13)
- # figwheel-main (3)
- # fulcro (67)
- # jobs (1)
- # juxt (4)
- # lumo (8)
- # mount (1)
- # off-topic (29)
- # onyx (1)
- # reagent (7)
- # reitit (3)
- # ring-swagger (5)
- # shadow-cljs (39)
- # spacemacs (5)
- # tools-deps (1)
hey folks I accidentally pushed to the clojure-emacs/cider-nrepl instead of my own fork... I undid it as soon as I realized (force pushed back to
4610439e68). It was there for maybe ~20 seconds. If you happened to pull/fetch during that time then I'm very sorry! If you see something weird on CI then... that was me. Apologies!
in related news we could use some help getting CI back on track. I've identified four separate issues that are keeping our builds from going green: https://github.com/clojure-emacs/cider-nrepl/issues/569#issuecomment-442807483
noob question: if I have cider running and need to add a library (`:require`), it’s not downloaded to the project and won’t work until something like lein gets the code. Does cider use lein or something like it when starting to get code specified in the
project.clj file? If not, is there a “best way” to download the library? Should I drop to an eshell and use lein to download? Can I just restart cider and it will trigger the download?
cider-quit followed by
cider-jack-in gets it done. Guessing
cider-restart does the same. Still not sure if cider uses lein or something else to download the library.
Cider constructs an invocation to lein, boot, or clj to start your app with the cider code inside of it. You should see a message and you jack in of the exact command that it is running
@U11BV7MTK beat me to it 🙂 you can find the exact invocation it uses in your
there are some projects which will allow you to add dependencies without restarting (pomegrenate, alembic), but you then need to make sure they are added to the project first. They also have some issues with newer versions of Java unfortunately. If you don't mind rebooting Clojure that's the easiest option.
thanks for the reply. So generally, when changing the project file, I should do a
@UBMFBEWKY if you have clj-refactor enabled, you can use
cljr-add-project-dependency which will help you find the available library and version, add it to the project and hotload it into the REPL. https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-project-dependency
@U05254DQM, I must not have it added, I can run it but get some error messages at the bottom of my console. I’ll keep it in mind for the future, for now, I need to keep going without getting too stuck on the myriad of cool things I can do. Thanks for the suggestion!
@UBMFBEWKY its optional package in the Clojure layer for Spacemacs. If you do decide to try it, add the following variable to the clojure layer in
.spacemacs, rather than just the word
(clojure :variables clojure-enable-clj-refactor t)
does that go in
.emacs.d/layers/+lang/clojure/config.el or just the spacemacs dotfile? Anywhere in particular in the dotfile?
the screenshot of the edit is in the right location, however you should remove the line with just the word
clojure, otherwise I assume it ignores the line with clojure and the variable. I do recommend restarting Spacemacs after saving this change, although you can probably just do
SPC f e R to reload the config.
@UBMFBEWKY for reference, here is the layer section of my .spacemacs file https://gist.github.com/jr0cket/543b93bfe2b0c38c6c0486b8002c7ab2#file-spacemacs-el-L35-L95
Btw, we’ve killed the hotloading feature in the latest clj-refactor, as it wasn’t playing well with Java 9+.
Now this can be done easily without clj-refactor, though - https://nrepl.xyz/nrepl/usage/misc.html
any word on a new lein version with the new nrepl? that's still a blocker yes? it would be nice if someone at the conj could be persuaded to cut a new release
I have java10 installed which apparently doesn’t have
javax.xml.bind.DatatypeConverter, so I’m still getting the error message trying to use
@UBMFBEWKY I suggest sticking with Java 8 for Clojure in general. Although Clojure and most libraries will work there are several little gotchas with newer versions of Java. Once Java 11 is more established, then I would consider moving over. I would also recommend openjdk from https://adoptopenjdk.net/ rather than the version from Oracle (which adds a few proprietary things on top of openjdk)