This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-15
Channels
- # announcements (13)
- # beginners (106)
- # cider (70)
- # cljdoc (1)
- # cljsjs (1)
- # clojure (97)
- # clojure-finland (1)
- # clojure-italy (13)
- # clojure-mexico (16)
- # clojure-russia (1)
- # clojure-spec (53)
- # clojure-uk (146)
- # clojurescript (44)
- # core-async (5)
- # cryogen (1)
- # css (1)
- # cursive (11)
- # datomic (89)
- # duct (10)
- # emacs (4)
- # figwheel-main (58)
- # fulcro (5)
- # hispano (35)
- # hyperfiddle (1)
- # jobs (2)
- # jobs-discuss (1)
- # lambdaisland (1)
- # leiningen (3)
- # off-topic (13)
- # onyx (50)
- # parinfer (3)
- # pedestal (4)
- # reagent (9)
- # ring-swagger (56)
- # rum (3)
- # shadow-cljs (85)
- # spacemacs (4)
- # vim (4)
hey all. I’m using spacemacs and my refactoring doesn’t appear to work. I can’t rename symbols. It tries to analyze the project and then comes back with an error in the minibuffer I don’t manage to read.
@triss some version information will be useful. What’s your CIDER, cider-nrepl and refactor-nrepl.
I think it’s an issue with some of my namespaces… sorry for all the noise. just finding my way in to CIDER properly…
I've trying to get CIDER running in a lein based project after upgrading emacs and CIDER.
The currently installed CIDER package version is 20180813.1518
.
In the project.clj
I removed all references to org.clojure/tools.nrepl
(and com.cemerick/piggieback
) because my understanding based on http://docs.cider.mx/en/latest/installation/ is CIDER will inject the new moved versions automatically.
Please note that nrepl/drawbridge "0.1.3"
also is a project dependency.
As a first step, I would like to get the JVM Clojure repl running again. Once that works I'll tackle the (figwheel) cljs repl.
When I run cider-jack-in-clj
, Clojure fails to start and in *Messages*
I find
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.dataformat.smile.SmileFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:374)
at clojure.lang.RT.classForName(RT.java:2204)
at clojure.lang.RT.classForName(RT.java:2213)
at cheshire.factory__init.__init0(Unknown Source)
at cheshire.factory__init.<clinit>(Unknown Source)
... 233 more
Note: com.fasterxml.jackson.core/jackson-core
is not explicitly referenced or excluded in the project.clj
).
This project was up and running 2 weeks ago the last time with the old version of emacs and CIDER.
Can someone hold my hand and help me get up and running again? Is more of the stacktrace useful?Okay, I reset the project so it contains the old drawbridge
and nrepl
dependencies and run cider-jack-in-clj
and it comes up!
wondering if anyone can help with me fix this error.
I'm using emacs 26.1
, and cider from MELPA (`0.18snapshot`).
I like to use a stand-alone repl, and have followed the cider manual's troubleshooting section , but not having any luck.
I have the same version specified in the :repl
the lein profiles.clj (`0.18.0-SNAPSHOT`) as I'm using in emacs.
I'm using Leiningen 2.8.1 on Java 1.8.0_171 OpenJDK 64-Bit Server VM
.
The error I'm getting when running cider-connect
is:
Debugger entered--Lisp error: (error "Version must be a string")
signal(error ("Version must be a string"))
error("Version must be a string")
version-to-list(nil)
version<=("0.18.0" nil)
cider--check-middleware-compatibility()
cider--connected-handler()
run-hooks(nrepl-connected-hook)
nrepl-start-client-process("localhost" 36225 nil #f(compiled-function (_) #<bytecode 0x29233bd>))
cider-nrepl-connect((:project-dir "~/git/wormbase-names/" :host "localhost" :port 36225 :repl-init-function nil :session-name nil :repl-type "clj"))
cider-connect-clj(nil)
funcall-interactively(cider-connect-clj nil)
call-interactively(cider-connect-clj nil nil)
command-execute(cider-connect-clj)
I'm using lein, here the profiles.clj
I'm using: https://github.com/mgrbyte/dot-files/blob/master/lein/.lein/profiles.clj
My emacs cider setup: https://github.com/mgrbyte/emacs.d/blob/master/init.el#L333-L340
cider-jack-in
works for me, so I assume I've missed something simple, but can't see what after a couple of hours staring at this.Should I remove the explicit dependency on [org.clojure/tools.nrepl "0.2.13"]
or should I replace it with nrepl "0.4.4"
?
Just removing the references to the old tools.nrepl
seems to work. Next, I'll try to replace drawbridge.
1. Dependency changed [com.cemerick/drawbridge "0.0.7"]
to [nrepl/drawbridge "0.1.3"]
2. Require changed [cemerick.drawbridge :as drawbridge]
to [drawbridge.core :as drawbridge]
Aaand it seems like that worked, too.
So it looks like before I was taking a too large step at once. Sorry for wasting your time.
Now I'll try cider-jack-in-cljs
with ClojureScript REPL type figwheel
with the old piggieback in the project.clj
.
That works. I'll try to move piggieback now:
In the :dev
profile I replace [com.cemerick/piggieback "0.2.2"]
with [cider/piggieback "0.3.8"]
And in :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
I replace it with cider.piggieback/wrap-cljs-repl
.
Now when running cider-jack-in-cljs
with REPL type figwheel
I get the error
!!! Unable to load a ClojureScript nREPL middleware library
Exception Failed to launch Figwheel CLJS REPL: nREPL connection found but unable to load piggieback.
This is commonly caused by
A) not providing piggieback as a dependency and/or
B) not adding piggieback middleware into your nrepl middleware chain.
example profile.clj code:
-----
:profiles {:dev {:dependencies [[com.cemerick/piggieback <current-version>]
[org.clojure/tools.nrepl <current-version>]]
:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}}
-----
Please see the documentation for piggieback here
I'm confused that the error is still referencing the old piggieback and nrepl locations.It seems I'm running CIDER 0.18.0snapshot (package: 20180813.1518)
with the old nREPL 0.2.13
. I thought they where incompatible?
I keep getting could not locate ring/server/standalone__init.class on classpath
. I have no idea how to fix this issue.
sounds like it. You can set cider-lein-parameters
to "with-profile +profile1 +profile2 repl :headless
via customize-variable
, in your .emacs/init.el or .dir-locals
Is that all in double quotes when I prompted with
Set cider-lein-parameters globally to value:
if you're setting it via customize-variable, then no quotes required around it I don't think.
@mgrbyte Your profiles setup seems correct, but the error you got indicates that cider-nrepl
is not loaded at all.
I'm using deps.edn (via lein-tools-deps), and it seems it's not merging the lein profile
Although now I get:
WARNING: CIDER 0.18.0-snapshot requires cider-nrepl to work normally. Please, install it!
More information.
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.4.0-SNAPSHOT (package: 20180808.606) and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.
Noticed that in the cider manual it mentions that it's a common mistake to put cider-nrepl in :plugins
instead of :dependencies
in the :repl
profile - think a reason for this might be that refactor-nrepl
has that on it's github README.
FWIW, I have successfully resolved my issue (using 0.18.0-SNAPSHOT) - working from both cider-connect
and cider-jack-in-clj
. The trick was to remove the configuration in ~/.lein/profiles.clj and move it to my :dev
profile in project.clj
.
Something not quite right, but probably because I'm using tools-deps and lein and latest snapshot. Something not quite right with profile merging when tools-deps in place. TBH I've always experienced issues with lein profile merging, something I hope goes away! 😆
where can I find how to add metadata to Clojure for formatting?
ok found, but I have a problem, I have a macro like let
and I am using {:style/indent 1}
like clojure-mode
...but I do not get the body forms aligned right
@vinai could you post your project.clj
that has a final working version of all the new cider settings. would be very useful to see it all in one place 🙂