This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-15
Channels
- # adventofcode (13)
- # aleph (5)
- # announcements (8)
- # beginners (87)
- # calva (9)
- # cider (102)
- # cljs-dev (71)
- # cljsrn (2)
- # clojure (198)
- # clojure-dev (28)
- # clojure-europe (3)
- # clojure-italy (27)
- # clojure-nl (3)
- # clojure-spec (1)
- # clojure-uk (43)
- # clojurescript (121)
- # component (11)
- # cursive (20)
- # data-science (13)
- # datascript (2)
- # datomic (102)
- # dirac (4)
- # duct (5)
- # emacs (14)
- # figwheel-main (7)
- # fulcro (37)
- # hoplon (11)
- # jackdaw (3)
- # jobs (2)
- # leiningen (16)
- # nrepl (2)
- # off-topic (51)
- # pathom (34)
- # pedestal (12)
- # perun (10)
- # portkey (1)
- # re-frame (6)
- # reitit (1)
- # shadow-cljs (21)
- # spacemacs (8)
- # tools-deps (2)
- # vim (2)
I'm getting a strange error when trying to run cljr-add-project-dependency
:
Retrieving list of available libraries...
cljr--get-error-value: Error in nrepl-refactor: clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(mranderson048/http_kit/v2v2v0/org/httpkit/client.clj:1:1)
at clojure.lang.Compiler.load (Compiler.java:7391)
...
followed by a hundred lines of stacktraces involving refactor_nrepl, cider.nrepl, and nrepl.middleware
I'm running the latest versions of cider 0.21.0 and lein 2.90, the same error also happens in projects using deps.edn
you are better off adding deps to your repl the way it is recommended in the cider docs
Is it possible to use Cider for ClojureCLR?
this might be a total shot in the dark but you might want to see what the Arcadia folks are doing. I think it's clojure on the unity game engine which is C#, right? I think they forked clojure clr. And they seem to have some kind of emacs repl goodness going on. https://github.com/arcadia-unity/Arcadia/wiki/REPL
I don’t know how you run it
I was wondering what editor I should use for it
I hoped to be able to use Spacemacs
But if Cider doesn’t work I don’t know what to use
>>>CIDER currently doesn’t support ClojureCLR. The reasons for this are the following: nREPL itself runs only on the JVM (because it leverages Java APIs internally). There’s an nREPL port for ClojureCLR, but it’s not actively maintained and it doesn’t behave like the Clojure nREPL. cider-nrepl uses a lot of Java code internally itself. Those issues are not insurmountable, but are beyond the scope of our current roadmap. If someone would like to tackle them, we’d be happy to provide assistance.
Hmm that’s a bummer
🙂 thanks
it basically just forms commands that you could write yourself so in theory it doesn't care about which Clojure you talk to. (i think?)
clj-refactor does work I guess
Except for adding dependencies
so I forgot how to add my custom aliases to a jack in command 😞
oh right cider-clojure-cli-global-options
grab this patch: https://github.com/clojure-emacs/cider/pull/2586
I saw that, do I understand right that you basically need to modify the whole string?
you don't have to. it plops the whole command in the minibuffer so you can see exactly where your modifications need to go
its so that every readme that shows which command line form to use is very easy to follow
@dpsutton I think I do make
and it does it all now
what is the error?
i've tried both. i get the classic command-execute: Wrong type argument: commandp, cider-find-var
let me try here, I am on master
uhm I do not see it either
weird I see the section in cider-autoloads.el
:
;;;### (autoloads nil "cider-find" "cider-find.el" (0 0 0 0))
;;; Generated autoloads from cider-find.el
(autoload 'cider-find-var "cider-find" "\
(autoload 'cider-find-dwim-at-mouse "cider-find" "\
(autoload 'cider-find-dwim "cider-find" "\
(autoload 'cider-find-resource "cider-find" "\
(autoload 'cider-find-ns "cider-find" "\
(autoload 'cider-find-keyword "cider-find" "\
so its supposed to build up a file .depend
and that never has any data written to it
must be something else, the .depend
are not used for autoloads
also, in my case it is populated
try make clean && make .depend
what does it do?
could be, do you have the gnu package installed, I know you need it for grep
for instance
also, which command are you using for loading the autoloads?
no sorry I mean Elisp code you use for loading the autoloads..
like use-package ...
yeah that is needed, I started to use use-package
so maybe I am missing something here too 😉
sorry to ask so many questions when i hadn't read the one line that would solve it for me
yes they are 😄
question for you @dpsutton I still don't really understand if use-package
is supposed to load cider-autoloads.el
for me (kind a new to it)
ok cool tnx 😉
> If you're not using one of tho mechanisms that registers autoloads, such as :bind or :hook, and your package manager does not provide autoloads, it's possible that without adding :demand t to those declarations, your package will never be loaded.
it looks like it gets a little manual. can you put that (load "cider-autoloads" t t)
form right after use-package?
I was going to try exactly that
this is also interesting: https://emacs.stackexchange.com/questions/19695/use-package-defer-t-and-add-hook
as I understand that you could just declare the function you are interested in and use-package
created the autoloads basically
this one is also a good one to know https://emacs.stackexchange.com/questions/19694/use-package-defer-t-and-autoloads
this works for me:
(load "cider-autoloads" t t)
(use-package cider
;; This seems enough for cider, see also:
;;
:defer t
:init
(setq cider-popup-stacktraces t
cider-popup-stacktraces-in-repl nil
cider-repl-use-clojure-font-lock t
cider-overlays-use-font-lock t
cider-repl-wrap-history t
cider-repl-history-size 1000
cider-show-error-buffer t)
:config
(add-hook 'cider-mode-hook 'eldoc-mode)
(add-hook 'cider-mode-hook 'paredit-mode)
(add-hook 'cider-repl-mode-hook 'paredit-mode)
(add-hook 'cider-repl-mode-hook 'eldoc-mode))
only thing I am missing is how to bind cider-insert-last-sexp-in-repl
to C-c C-c
also to scroll the REPL when cider-insert-last-sexp-in-repl
is doing its thing, @dpsutton do I have to set something for the scroll part?
Nope, I think that feature has been changed/tweaked - I will read more
I put (setq scroll-conservatively 101)
like I read somewhere but I don't see it scrolling unfortunately
from the CHANGELOG:
> * Option cider-repl-scroll-on-output
is now obsolete, and the default REPL behaviour has changed to not recenter the window. The built-in variable scroll-conservatively
can be set to 101 (either globally or locally in the REPL buffer) to restore the old behaviour. This change has a dramatic positive effect on REPL performance.
with (setq scroll-conservatively 0)
it does not do it either
Yeah, scroll-conservatively
only has any affect if the point is moved – but it seems the insert-*-in-repl
commands leave the point at the start of the input
yes @cichli that's what happens, I see it as well now - maybe @dpsutton I can open an issue? no rush on this, just gathering some thoughts
I think the right thing to do is probably move the point to the input end… but I haven’t really used these commands so not sure if there’s a good reason they don’t do that 😄
@richiardiandrea I’ve pushed another attempt at fixing https://github.com/clojure-emacs/cider/issues/2589 if you want to test again
let me try live 😉
I’m curious as to why we end up calling buffer-substring-no-properties
on the *cider-result*
buffer rather than the source buffer… we explicitly don’t select it when we display it, but possibly something in your config is altering that
it can be, I have a possible bloated Emacs Live custom branch
I am trying to trim it down as much as possible
@cichli it seems like it is working now
All the possible config around display-buffer
is quite confusing so it’s possible we’re missing an edge case in the popup code
😄 no problem, thank you for debugging!
this is the first time I am trying this feature actually, my workflow is quite different, usually I just send to the REPL buffer, having a dedicated result window has its advantages though
good stuff
In my cider repl buffer, *e used to print stacktraces, now it just prints
*e
#object[java.lang.AssertionError
"0x5d79b28d"
"java.lang.AssertionError: Assert failed:
. How do I get that behavior, printing the whole stacktrace, back? CIDER 0.20.0