Recently, I’ve been using Emacs and Cider a bit more, so I’ve been wondering about clearing a warning that I get when I try cider-jack-in for a leiningen project, and allow cider to start leiningen:
> WARNING: CIDER requires cider-nrepl to be fully functional. Some features will not be available without it! (https://docs.cider.mx/cider/1.1/troubleshooting.html#cider-complains-of-the-cider-nrepl-version)
Note, I don’t know much about either emacs, or Cider.
Emacs has Cider 1.1.1 installed.
The “More information” link is for the troubleshooting subsection: CIDER complains of the `cider-nrepl` version. This is a similar, though different, warning. But assuming that it’s about right, then I’m thinking that the subsection I’m interested in is:
> https://docs.cider.mx/cider/1.1/troubleshooting.html#you-see-not-installed-or-nil-and-youre-starting-the-repl-with-cider-jack-in You see `not installed` or `nil`, and you’re starting the REPL with `cider-jack-in`
• cider-inject-dependencies-at-jack-in
is set to t
• My project uses Clojure 1.10.3
• Leiningen is 2.9.6
There is also the suggestion of configuring cider-nrepl myself (my understanding was that this should be brought in automatically though, is that right?). Anyway, I added into my :plugins
section:
:plugins [[cider/cider-nrepl "0.26.0"]]
However, I continue to get the warning. Does anyone have a suggestion of where I can learn enough to address this please?@quoll at the start of the repl should be a startup form. can you paste that here (love your work by the way)
;; Startup: /usr/local/bin/lein update-in :dependencies conj \[nrepl/nrepl\ \"0.8.3\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.26.0\"\] -- repl :headless :host localhost
… and thank you 🙂can you see what (apropos "cider")
returns?
identifying the source of the error: either it's correctly not seeing cider-nrepl or it's incorrectly saying cider-nrepl is not available when it is available
(any chance you have a locally installed version of cider-nrepl? ie, lein install from a local copy of it?)
I doubt it, but if I did it would have been from years ago
what would I be looking for?
BTW, the result of the apropos was: ()
ok so it seems like cider-nrepl is not around. if you copy that startup script, run it from a terminal, can you try to cider-connect to it and see if you get the same warning?
It took a while because after updating to Cider 1.1.1 (I was on an older one until 30 minutes ago), my cider repl no longer includes clojure.core nor clojure.repl. Very annoying, but I can work around it
very weird
here i used that same startup command (without the headless and host part) and checked if cider was around
what do you mean it no longer includes clojure.core nor clojure.repl?
like evaluating (defn foo [])
reports an error that defn
is undefined?
OK… after connecting I get the same warning
and yes
ok. that part sounds like you did (in-ns 'some-namespace-not-required-yet)
but not positive
After the cider-connect
I have access to clojure.core
any chance you have a profiles.clj
file in your lein directory in your home dir?
yes, I do
does it have some old junk laying around, maybe a conflicting version of cider-nrepl?
no… but I just realized that I have :implicit-middleware false
that sounds ... like a likely culprit but i've never heard of it before lol
I removed it and it worked! Yay!
if you restore it and add the plugin directly into your project.clj i suspect it will work?
I put it in blindly a long time ago when some other package wanted it for some reason
not sure where you security preferences are now if you want that enabled, but if so, i bet you can get around it
awesome. well sounds like that feature works 🙂
congrats on your strange loop talk!
When it was in I was explicitly include cider-nrepl and that wasn’t helping
yeah that's a bit strange to me
Thank you. I’m only panicking a bit so far
i wonder if there's a bug when you "implicitly" include a plugin if it denies that plugin from being used, even if you directly depend on it as well
your last talk on graph databases went really well so i'm sure you'll do really well again 🙂
I don’t know. I can’t tell you which package suggested that I configure this too
Oh, the :clojureD talk?
yeah. i built a repl history that would collect all forms and throw them into asami with your help
so you could query for all history that used a particular form, etc
oh, cool 🙂
you did all the heavy lifting 🙂
I’m finding Asami is helping me with lots of things now 🙂
Someone wanted to load a pcap file (packet capture) in JSON format, but his edn was failing due to some attributes having spaces in them. I’ve removed data checking now, so you can just load raw JSON if you want. So then I could do queries to find all the attributes, and filter them (in the query) by regex to give me the ones with spaces.
Maybe it’s because I’m used to graph thinking now, but I found it much easier to query the data than to process seq of maps that were embedded to arbitrary depth!
It feels icky to have string attributes, but… hey, it works! 🙂
Thank you so much for the help!
yeah. at some point you need a proper query. sounds really cool
(require '[asami.core :as d])
(require '[cheshire.core :as json])
(def conn (d/connect "asami:<mem://data>"))
(def tx @(s/transact conn {:tx-data (json/parse-string (slurp "/path/to/file.json"))}))
(d/q '[:find (count ?a) . :where [?e ?a ?v]] conn)
(d/q '[:find [?a ...] :where [?e ?a ?v] [(re-find #" " ?a)]] conn)
Those last 2 queries told me how many attributes were in his json, and which ones had strings with spaces in them
lovely
i had need of a triple store in cljs recently. a really simple no-logic-engine, just assert triples and missed having something like this around
my colleagues were constantly creating convenience functions that accepted connections and called d/db
on it before sending it to the query. So now queries accept connections and do that step implicitly
Well, it’s free. 🙂
And if anything goes wrong, I know a woman who can help
I think I discovered why I couldn’t access clojure.core a few minutes ago
I think I used C-c M-n M-n to set the namespace in my repl, but I had not used C-c C-k to load it
yup
which does an in-ns
before require
my muscle memory got used that one quit
quick
Thank you for all the help. I’d just have been as stuck as ever
absolutely my pleasure