This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-06
Channels
- # announcements (3)
- # beginners (83)
- # calva (11)
- # cider (24)
- # cljdoc (2)
- # cljs-dev (1)
- # clojure (216)
- # clojure-berlin (1)
- # clojure-dev (18)
- # clojure-europe (8)
- # clojure-italy (5)
- # clojure-losangeles (2)
- # clojure-nl (4)
- # clojure-spec (34)
- # clojure-uk (75)
- # clojuredesign-podcast (12)
- # clojurescript (33)
- # clojutre (13)
- # community-development (1)
- # core-async (38)
- # cursive (19)
- # datomic (28)
- # duct (3)
- # emacs (1)
- # events (5)
- # figwheel-main (3)
- # fulcro (93)
- # kaocha (20)
- # lambdaisland (2)
- # off-topic (40)
- # pathom (17)
- # pedestal (8)
- # quil (1)
- # re-frame (14)
- # reitit (19)
- # shadow-cljs (34)
- # sql (8)
- # tools-deps (6)
- # vim (1)
- # xtdb (8)
- # yada (18)
Is there a way to customise the way that CIDER shows the exception messages when an error is thrown? It seems to show all the information for the first exception, and only the exception class for the exception causes. It would be quite helpful if I could also have the exception message shown for all of the causes, and perhaps to not fully expand the first exception. When Integrant throws an exception during init, it provides a lot of data in the ex-data
which can be a bit overwhelming.
This is what I currently get
Show: Project-Only All
Hide: Clojure Java REPL Tooling Duplicates (0 frames hidden)
2. Unhandled java.net.BindException
1. Caused by clojure.lang.ExceptionInfo
Error on key :duct.server.http/aleph when building system
{:reason :integrant.core/build-threw-exception,
:system
< ... 600 lines ... >
:function #multifn[init-key 0x4f0a4cb8],
:key :duct.server.http/aleph,
:value {:port 8686, :handler #function[clojure.lang.AFunction/1]}}
core.cljc: 285 integrant.core$build_exception/invokeStatic
core.cljc: 284 integrant.core$build_exception/invoke
core.cljc: 296 integrant.core$try_build_action/invokeStatic
<... elided ...>
session.clj: 171 nrepl.middleware.session/session-exec/main-loop/fn
session.clj: 170 nrepl.middleware.session/session-exec/main-loop
AFn.java: 22 clojure.lang.AFn/run
Thread.java: 834 java.lang.Thread/run
< cursor is here, right at the bottom >
Here's what I'd like to have by default (I think)
Show: Project-Only All
Hide: Clojure Java REPL Tooling Duplicates (0 frames hidden)
2. Unhandled java.net.BindException
Address already in use
1. Caused by clojure.lang.ExceptionInfo
Error on key :duct.server.http/aleph when building system
I guess a secondary feature request here would be to have more control over expanding the ex-message
separately from the ex-data
, or perhaps limiting how big the ex-data
can be printed in the stacktrace buffer.
@danielcompton Not yet. The current display was not intended and is basically the result of the changes in Clojure 1.10. I was actually planning to just strip this data from the first stack frame, as it kind of breaks the structure of the stacktrace.
I think there was some ticket where we were discussing how to best handle this, I’ll have to dig it up.
@robertkrahn is there a huge performance drop down after suitable introduced into cider? I usually do complete by pressing TAB, when the complete menu popup, I can hardly type
@doglooksgood It depends on the speed of the repl connection / how long an eval takes. Suitable evals a code snippet so this might introduce a noticeable lag. It should only happen in interop expressions, though (e.g when typing (.| js/fooo)
)
We will add a switch to allow to deactivate suitable, I think. We might also consider having a timeout.
Hmm this should not trigger suitable
are you connected to a local browser? is there a lag when you eval an expression?
OK, I will check that and whether suitable really won't get triggered for normal symbol completions (it shouldn't eval in that case but I will check). As I said, I'm pretty sure there will be a switch to disable suitable before long. Thanks for letting me know 🙂
Error loading refactor-nrepl.middleware: java.io.FileNotFoundException: Could not locate cider/nrepl/middleware/util/cljs__init.class or cider/nrepl/middleware/util/cljs.clj on classpath., compiling:(refactor_nrepl/middleware.clj:1:1)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor in this context, compiling:(/private/var/folders/rd/0xkr22fd1jq8y8j4856s7sy40000gp/T/form-init8061324572855299348.clj:1:2313)
Do you have the clj-refactor Emacs package installed? In that case see https://github.com/clojure-emacs/cider/issues/2284
If you want to keep using it you can add refactor-nrepl {:mvn/version "2.5.0-SNAPSHOT"}
into your user deps.edn or project deps. Even though it isn't fully compatible anymore I still can use it for various things like import cleanups and such.