This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-12
Channels
- # adventofcode (135)
- # announcements (1)
- # beginners (192)
- # boot (5)
- # calva (130)
- # cider (42)
- # cljdoc (4)
- # cljs-dev (6)
- # cljsrn (3)
- # clojure (222)
- # clojure-europe (2)
- # clojure-greece (5)
- # clojure-italy (24)
- # clojure-nl (23)
- # clojure-russia (1)
- # clojure-spec (6)
- # clojure-uk (67)
- # clojurescript (35)
- # cursive (39)
- # datomic (61)
- # emacs (17)
- # figwheel (3)
- # figwheel-main (2)
- # fulcro (12)
- # hyperfiddle (10)
- # juxt (3)
- # leiningen (10)
- # nrepl (35)
- # off-topic (34)
- # onyx (3)
- # pathom (6)
- # quil (5)
- # re-frame (29)
- # reitit (6)
- # ring (1)
- # ring-swagger (8)
- # shadow-cljs (37)
- # spacemacs (9)
- # sql (9)
- # tools-deps (24)
- # unrepl (1)
- # vim (1)
hi, i am seeing a strange issue with cljs while using cider-find-ns
. Sometimes it shows correct file, but sometimes it says "Can't find namespace 'my.namespace'". I could see no perceptible difference in those files. any clues?
one thing i note, the behavior is file specific. for a particular file, it either works or fails always even after restarting emacs.
on further debugging found that,
(cider-nrepl-send-sync-request `("op" "ns-path" "ns" "my.namespace"))
returns (dict "status" ("done") "path" nil ...)
. so in the nrepl process itself not able to find it.hello! I tried to jack-in into a project with deps.edn
and CIDER failed to connect with Exception in thread "main" java.io.FileNotFoundException: Could not locate cider_nrepl/main__init.class or cider_nrepl/main.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
. That’s not surprising, because it looks like it’s invoking this: /usr/local/bin/clojure -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["refactor-nrepl.middleware/wrap-refactor", "cider.nrepl/cider-middleware"])'
do I need cider-specific deps in my deps.edn?
@stathissideris do you have cider configured to not inject dependencies?
@dominicm YES! genius! I remember now I disabled that because of reloading problems in the past
thanks
Lein 2.8.2 is out (https://github.com/technomancy/leiningen/releases/tag/2.8.2) and it bundles the latest and greatest nREPL release! All CIDER users are strongly advised to move from Lein 2.8.1 to 2.8.2. The plan is that CIDER 0.20 will require 2.8.2 or newer for cider-jack-in to work.
For MacOS users, my PR to upgrade it in homebrew just got merged too. Happy updating! 😄
is it possible to enable breakpoints on exceptions? iirc java has this, but I haven't been able to find it for clojure
on digging deeper found that the value of :defs
is {}
in the return from cljs-tooling.util.analysis/find-ns
, when the source file doesn't have a single def
form. which is typical for subs or event files in re-frame projects. as a result cider-find-keyword
fails with "Can't find namespace". @bozhidar any suggestion? as a workaround i can put a dummy def form in those files. is there any other way?
> is it possible to enable breakpoints on exceptions? iirc java has this, but I haven’t been able to find it for clojure
> also is it possible to automatically reload files into the buffer when I save them?
> on digging deeper found that the value of :defs
is {}
in the return from cljs-tooling.util.analysis/find-ns
, when the source file doesn’t have a single def
form. which is typical for subs or event files in re-frame projects. as a result cider-find-keyword
fails with “Can’t find namespace”. @bozhidar any suggestion? as a workaround i can put a dummy def form in those files. is there any other way?
>Potentially it’s doable, but I don’t think anyone’s working on this. @bozhidar okay, good to know. >Yeah, you can always leverage Emacs’s after-save-hook or something like this. ah, I see. I was somehow thinking that the nrepl should be the one looking for file changes, but using the save hook makes sense 🙂
With latest nREPL I get nrepl-send-sync-request: Sync nREPL request timed out
on cider-jack-in-clj&cljs
. Is it happening to someone else?
@manuel This is the issue i think: https://github.com/technomancy/leiningen/issues/2497
Get this error REPL server launch timed out.
even when you run lein repl
manually
Do you use clj-refactor, in particular cljr-find-usages
and/or cljr-rename-symbol
?
This is something that I really miss - I normally just do fulltext search and/or replace
Trying to use aforementioned functions give me these errors in our project:
Caused by: clojure.lang.ExceptionInfo: [line 11, col 0] Invalid keyword: ::specs/warning.
I tried to use cider-load-all-project-ns
(as suggested here: https://github.com/clojure-emacs/clj-refactor.el/issues/353) but it just keeps throwing those errors.
I guess that performance also isn't great but it could be usable if it ever worked.Hi. Does anyone know if there's a cider command for formatting code in multiple lines? Like, given a {:foo :bar :baz :x}
map, format it in the buffer like {:foo :bar \n :baz :x}
@andre.peric look up the cider-pprint-
family of functions and options; they should have you covered.
Yeah, it should, but lein repl :headless
was never broken, so this won’t really fix the problem for anyone.
I know that Phil will issue a bugfix lein release pretty soon. I won’t be surprised if it happens today.