This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # babashka (77)
- # beginners (219)
- # chlorine (6)
- # cider (52)
- # clj-kondo (14)
- # cljdoc (5)
- # clojure (173)
- # clojure-europe (49)
- # clojure-finland (1)
- # clojure-germany (2)
- # clojure-italy (1)
- # clojure-nl (39)
- # clojure-sweden (4)
- # clojure-uk (51)
- # clojurescript (25)
- # code-reviews (9)
- # conjure (25)
- # data-science (2)
- # figwheel-main (6)
- # fulcro (74)
- # graalvm (1)
- # graphql (11)
- # jobs-discuss (17)
- # keechma (4)
- # lein-figwheel (4)
- # leiningen (1)
- # luminus (10)
- # malli (14)
- # mid-cities-meetup (2)
- # off-topic (28)
- # re-frame (5)
- # reagent (76)
- # reitit (30)
- # ring (7)
- # ring-swagger (1)
- # shadow-cljs (163)
- # spacemacs (11)
- # specter (2)
- # sql (43)
- # tools-deps (13)
- # vim (6)
- # yada (1)
So far the workaround seems to do the job, but then again I could have sweared it also worked at first without the workaround
cider-ns-refresh wraps clojure.tools.namespace,
While https://github.com/clojure-emacs/cider/blob/f4eebe621231f088afb47cd93884444bfd1f0473/cider-ns.el#L192 says:
does not rely on org.clojure/tools.namespace.
So I'm wondering - what's the exact relationship between cider and t.n?
For extra context, I reload code my own way (without cider's helpers), which works OK, but I need to understand how most emacsers do this
@vemv The fancier refresh command uses c.t.n., the basic reload command just does
It really depends on what you need (and whether you’re working with Clojure or ClojureScript).
If I add this:
to my project and do a
:plugins [[cider/cider-nrepl "0.25.0-SNAPSHOT"]]
lein replI keep getting errors like:
and warnings etc.
Unable to resolve var: cider.nrepl/wrap-apropos in this context
I’ve tried with 0.24.0 and see the same - not even trying to connect
cider, just start the repl
I see only 2019 issues looking like this - so don’t seem to be still around - but do I need to add more dependencies?
Narrowed it down slightly:
I cannot find a way to start a
cider-nrepl loaded repl on a
lein plugin project
I get this sort of error each time. I’ve tried with
cider-jack-in-clj using latest
cider, but also I’ve tried starting the
lein repl myself with the
cider-nrepl (0.24.0 and 0.25.0-SNAPSHOT behave the same for me) explicitly given.
is what my version of
[nREPL] Starting server via /usr/local/bin/lein update-in :dependencies conj \[nrepl\ \"0.7.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.25.0-SNAPSHOT\"\] -- repl :headless :host localhost
CIDER 0.25.0snapshot (package: 20200404.914)
and i see you tried bumping it but maybe check some
lein deps :tree and
lein deps :plugin-tree to see what nrepl version is actually resolved?
but wonder why this only happens when trying to start a repl with cider-repl middleware in a plugin
been a bit but i think that lein 2.8.3 is nrepl < 0.6 which would explain the failure on nrepl.middleware.print. Why that happens only as a plugin I haven't a clue, unless maybe as a proper dep it affects the dep version resolution better?
ie, if a proper dep it gets to override lein's nrepl version. as a plugin it doesn't?
so when you try to load a “plugin project” I guess it puts your current
lein version deps on the same classpath
so perhaps newer cider now requires newer nrepl - and I can’t have old
lein running things in these projects
because it means 2.8.3 lein is trying to share classpath with these newer cider deps and they clash on nrepl
this sounds plausible. I will tryin a few to bump my
lein version to see if it it clears it up
> ie, if a proper dep it gets to override lein’s nrepl version. as a plugin it doesn’t? yes, probably the issue indeed
@mikerod When using
cider-jack-in CIDER will override the nREPL bundled with Lein, but I think if you just use
cider-nrepl as a plugin you’ll end up using whatever nREPL is shipped with Lein.
So yes, the take away is that if you have
:eval-in :leiningen in your project.clj (it’s a plugin project), then your
lein version has to be compatible with
cider deps since they are all on same classpath
which was too far below the min threshold for recent cider middleware I’d think - so was getting the missing var stuff
@bozhidar thanks for your work on this stuff! its so important for the community at large
> i suppose a new one will come soon depending on nrepl 0.7.0 I’ve been planning to send a PR about this for a week now. I’ll do it soon.
I doubt there’ll be a new Lein release soon, as Phil just cut the latest one, so I’m taking my time. 🙂
Really beginner question here, but how do I send the entire code buffer to the REPL? My separate-window REPL throws errors about undefined symbols even after
cider-load-buffer, but evaluation inside the code buffer (with
C-c C-c ,
C-c C-e for example) works fine. This works perfectly fine for me but makes the separate repl buffer kinda useless. For context, I'm on a fresh install of Doom Emacs using their packaged defaults; not sure if that's the issue. Couldn't find anything inside the documentation about a command like
Sounds like namespace fundamentals. You evaluated a buffer that puts functions into a namespace. Then in the repl (by default in the user namespace) you reference a function defined in a different ns
@dpsutton Whoops, you're absolutely right, just assumed that the repl would ns to my current file for some reason, even though now I think about it it'd be kinda hard/not make sense across multiple buffers. Thanks a ton for the sanity check!
yeah. when you eval things in the buffer it looks to see that ns. you're in charge of the ns in your repl
Aha, found it! It's darn simple but it worked last time I tried: https://www.emacswiki.org/emacs/DataDebug