Fork me on GitHub

if I see WARNING: CIDER 1.1.0-snapshot requires cider-nrepl 0.25.9, but you're currently using cider-nrepl 0.21.1. The version mismatch might break some functionality! have I done something wrong, or did I catch my spacemacs dependenies in a weird state when I updated my packages? (I just refreshed develop and updated all my packages)


hmm.. following up, I tried using the practicalli spacemacs config and it has the same error.


ugh. I'm still new to this. I found the old version of cider-nrepl was specified in the project.clj


If you are using cider-jack-in to start the REPL, remove the cider-nrepl dependency from the project.clj. If using cider-connect then update the version of cider-nrepl in project.clj to match the version of Cider

👍 3

Another newb question - how do I load environment variables into my repl ? I've got direnv setup in my shell, and a .envrc file at the root of my clojure project, but I'm stumped as to how to provide the env vars to the repl process. Any pointers appreciated.


(System/getenv "PORT")
This will read the value of the PORT environment variable


If you add an environment variable to you operating system with Emacs already running, you will need to restart before Emacs picks it up. If you are using Spacemacs develop them add the environment variable to spacemacs.env SPC f e e Then reload spacemacs.env (which I think is SPC f e E )

👀 3

oooh. Interesting


My use case is that I want the jvm started with cider-jack-in to have certain environment vars. For my shell I use direnv but I'm not sure what's the best way (or frankly any way) to get this to work in spacemacs. I see there's at least a couple of existing emacs plugins ( and but I'm not comfortable enough with spacemacs (or emacs) to try creating my own layer. Am I missing existing functionality in spacemacs on how to use these env vars ? is it possible to set environment variables with .dir-locals.el that would be exposed to a repl process?


in the short term, I guess I can swap out different versions of spacemacs.envand restart emacs when switching projects.. I didn't know about spacemacs.env - thank you!


I would probably create a spacemacs.env file for each set of environment variables, naming them something like spacemacs.env.appone, spacemacs.env.apptwo and create a symbolic link called spacemacs.env that links to which ever file has the ones I need. When changing apps, I'd recreate the symbolic link to point to the other file and run SPC f e E to load it.


that seems viable, and is a step better than what I've got going.. thank you for your advice