This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-23
Channels
- # announcements (6)
- # aws (4)
- # babashka (66)
- # beginners (70)
- # calva (2)
- # cider (62)
- # clara (1)
- # clojars (5)
- # clojure (101)
- # clojure-dev (67)
- # clojure-europe (1)
- # clojure-nl (3)
- # clojure-uk (13)
- # core-async (15)
- # datomic (11)
- # defnpodcast (10)
- # duct (22)
- # emacs (6)
- # events (1)
- # fulcro (34)
- # kaocha (3)
- # off-topic (20)
- # pathom (1)
- # re-frame (8)
- # reagent (14)
- # remote-jobs (1)
- # shadow-cljs (58)
something weird going on since yesterday, starting a repl with cider I get
Caused by: java.lang.IllegalAccessError: reader-error does not exist
at clojure.core$refer.invokeStatic (core.clj:4249)
clojure.core$refer.doInvoke (core.clj:4217)
clojure.lang.RestFn.applyTo (RestFn.java:139)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$load_lib.invokeStatic (core.clj:5966)
clojure.core$load_lib.doInvoke (core.clj:5928)
clojure.lang.RestFn.applyTo (RestFn.java:142)
clojure.core$apply.invokeStatic (core.clj:667)
works fine if I do lein repl
from the terminal, anyone else seeing this?
I'm on CIDER 0.24.0snapshot (package:
Hmm. Funny.
I've just tried to start our app and suddenly getting this error when I try to run cider-jack-in
:
error in process sentinel: Could not start nREPL server: clojure.lang.Compiler$CompilerException: Syntax error compiling at (clojure/tools/reader/edn.clj:41:7).
#:clojure.error{:phase :compile-syntax-check, :line 41, :column 7, :source "clojure/tools/reader/edn.clj"}
at clojure.lang.Compiler.analyze (Compiler.java:6808)
...
lein repl
works fine
I tried to add an explicit dependency on tools.reader into my project.clj:
[org.clojure/tools.reader "1.3.2"]
But that doesn't help.I've found this one: https://github.com/clojure-emacs/cider/issues/2236 But they say adding an explicit dependency on tools.reader did help them
ah right I'm not the only one then, and doesn't actually happen in all the projects either
I cleared also everything I had in my lein profiles just to be sure
yes same thing
also adding tools.reader as dependency doesn't help
starting the repl from the terminal and doing cider-connect
works
so definitively one of the libraries used in the cider startup is acting funny
I get the same problem with an open source project btw: https://github.com/FundingCircle/topology-grapher/ if anyone else could give it a try, I'll file an issue in the meanwhile or reopen that same one?
I just tried even starting with Emacs -Q
with 0 config and it's the same problem
clj-refactor is an installed package. Status: Installed in ‘clj-refactor-20191217.909/’ (unsigned). Version: 20191217.909
should I try to delete that?
mm no same thing after I delete it
strange thing is that everything was working fine until a few days ago, but I don't even see any suspicious commit recently
Yep, the same for me too. I had older cider release from september so I tried to upgrade but the issue remains even with the latest version
is the full lein
command printed somewhere apart from the minibuffer? it doesn't go to Messages, would be nice to see that
trying to run it without some arguments
/usr/local/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[refactor-nrepl\ \"2.5.0-SNAPSHOT\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.23.0-SNAPSHOT\"\] -- repl :headless :host localhost
I get further if I exclude the refactor-nrepl
plugin but then it freezes before the repl prompt shows up:
/usr/local/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.23.0-SNAPSHOT\"\] -- repl :headless :host localhostWARNING!!! version ranges found for:
[org.eclipse.xtend/org.eclipse.xtend.lib "2.8.4"] -> [org.eclipse.xtext/org.eclipse.xtext.xbase.lib "2.8.4"] -> [com.google.guava/guava "[10.0.1,14.0.1]"]
Consider using [org.eclipse.xtend/org.eclipse.xtend.lib "2.8.4" :exclusions [com.google.guava/guava]].
[org.eclipse.xtend/org.eclipse.xtend.lib "2.8.4"] -> [org.eclipse.xtend/org.eclipse.xtend.lib.macro "2.8.4"] -> [com.google.guava/guava "[10.0.1,14.0.1]"]
Consider using [org.eclipse.xtend/org.eclipse.xtend.lib "2.8.4" :exclusions [com.google.guava/guava]].
[org.eclipse.xtend/org.eclipse.xtend.lib "2.8.4"] -> [org.eclipse.xtend/org.eclipse.xtend.lib.macro "2.8.4"] -> [org.eclipse.xtext/org.eclipse.xtext.xbase.lib "2.8.4"] -> [com.google.guava/guava "[10.0.1,14.0.1]"]
Consider using [org.eclipse.xtend/org.eclipse.xtend.lib "2.8.4" :exclusions [com.google.guava/guava]].
Instrumented specs
nREPL server started on port 57012 on host localhost -
# and then nothing ...
Btw. you can customize that via prefix, e.g. C-u , '
But that doesn't help anyway in this case 🙂
well for me it works with the full command from the shell
$ /usr/local/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[refactor-nrepl\ \"2.5.0-SNAPSHOT\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.23.0-SNAPSHOT\"\] -- repl
nREPL server started on port 64850 on host 127.0.0.1 -
REPL-y 0.4.3, nREPL 0.6.0
Clojure 1.10.0
OpenJDK 64-Bit Server VM 12.0.1+12
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
user=>
ah the reason why I don't see it in Messages is that the buffer size is too small
and I lose that message 😄
message-buffer-max-lines
should help
Ah, that's interesting. For me the error is basically the same regardless if I run it from Cider or from cmd - it's weird that it's different for you; But then I experience a slightly different issue:
clojure.lang.Compiler$CompilerException: Syntax error compiling at (clojure/tools/reader/edn.clj:41:7).
#:clojure.error{:phase :compile-syntax-check, :line 41, :column 7, :source "clojure/tools/reader/edn.clj"}
ok yeah anyway it's definitively refactor-nrepl somehow, I reproduced it also in the shell now
no I think it's the same error
I was testing on another project, in that project it didn't actually fail
I tried refactor-nrepl 2.4.0 but it freezes in a similar way as if I try to exclude it completely
maybe one of these changes
to me this command works
/usr/local/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[refactor-nrepl\ \"2.4.0\"\] -- update-in :plugins conj \[com.billpiel/sayid\ \"0.0.18\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.23.0-SNAPSHOT\"\] -- repl :headless :host localhost
, so using 2.4.0 for refactor-nrepl
I suggest also removing sayid from your Cider configuration when having issues, especially with newer versions of Cider and nrepl. Cider has its own debugger and Sayid does not get a lot of maintenance as far as I know.
the question is how do I actually disable it?
I mean apart from running the command manually in the repl without the extra args
can't find anything in the cider config to do that
Sayid no longer includes Cider by default, so it seems you have some code to add the sayid package (or did a packages-list-packages install). If you are using Spacemacs develop
branch then just update spacemacs (git pull) and check your .spacemacs
layer configuration is not including sayid (no sayid variable or sayid variable set to nil)
the problem is not sayid it's refactor-nrepl
You are running sayid based on the lein
command line in Emacs when running cider-jack-in. Sayid has been a cause of many issues in the past. Unless you are actively debugging your entire project on a regular basis, then it is recommended that you remove sayid. The same goes for clj-refactor.
Even if there is a bug elsewhere, sayid and clj-refactor should be removed unless your development workflow actively depends on them to avoid experiencing issues that seem to be other packages when really these packages are the cause.
so yeah definitively that, can I just disable it entirely somehow?
@bozhidar could it be some recent change to https://clojars.org/refactor-nrepl/versions/2.5.0-SNAPSHOT ?
I would guess it's in one of https://clojurians.slack.com/archives/C0617A8PQ/p1577098713041900
I can't find how to disable refactor-nrepl entirely or at least pin it to 0.24 btw
I've tried to build my own version but ./build.sh install
failed (`Caused by: http://java.io.FileNotFoundException: Could not locate clojure/spec/alpha__init.class or clojure/spec/alpha.clj on classpath.`)
probably too old version of clojure?
I created this issue in the meanwhile https://github.com/clojure-emacs/refactor-nrepl/issues/283
after a bit of bisecting this is the commit that broke it https://github.com/clojure-emacs/refactor-nrepl/commit/75f5255f0e4e701f50d30cc58216e03c2d558905
if anyone wants a workaround in the meanwhile just:
• checkout locally the refactor-nrepl project
• git checkout e35af1d1b972cfecbf5e857384234ac3f683652d
to get to a working version
• lein install
to install it in your maven dir (overriding the 2.5.0-SNAPSHOT that would be downloaded)
Thank you so much for this @U0524T275!
with that it should all work locally (at least it does for me)