This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-08
Channels
- # announcements (42)
- # aws (2)
- # babashka (69)
- # beginners (38)
- # calva (18)
- # cider (39)
- # circleci (1)
- # clj-commons (10)
- # cljs-dev (2)
- # clojure (36)
- # clojure-australia (14)
- # clojure-europe (25)
- # clojure-gamedev (40)
- # clojure-losangeles (4)
- # clojure-nl (5)
- # clojure-sweden (1)
- # clojure-uk (5)
- # clojurescript (133)
- # core-logic (24)
- # cursive (7)
- # datalevin (4)
- # datascript (3)
- # figwheel-main (1)
- # fulcro (45)
- # honeysql (1)
- # integrant (43)
- # introduce-yourself (1)
- # jobs (4)
- # leiningen (3)
- # lsp (32)
- # nextjournal (9)
- # pathom (18)
- # polylith (21)
- # portal (65)
- # re-frame (6)
- # releases (1)
- # remote-jobs (1)
- # reveal (12)
- # rewrite-clj (1)
- # sci (84)
- # tools-deps (22)
I was wondering if anyone had some issue with cider-load-buffer
with conditional reads and a clojure/jvm process? I get the error conditional reads are not allowed
, so I resort to call cider-eval-buffer
, is this expected? I am sorry if the question is trivial.
Hello, does anyone happen to make https://github.com/metosin/testit work with cider ? (currently it obviously fires the error that says that there is no 'is' defined in tests)
I think e.g. @U06QSF3BK is using Emacs / Cider. I'm a Cursive guy myself. 🙂 https://www.metosin.fi/blog/metosin-favorite-editors/
on metosin/testit > https://github.com/metosin/open-source#project-lifecycle-model Deprecated: not actively maintained nor recommended for new projects
@U76D9RZRR thanks for the redirect! @U06QSF3BK ok interesting, may be I should try clojure-lsp too though currently everything seems to work fine with cider except tests currently. Unfortunately have to support lots of testit-based codebase even it's deprecated.
perform walk/macroexpand-all
on a deftest and see whether in fact is has an is
somewhere
CIDER doesn't perform an heuristic, it just runs whatever you throw at it so it if contains an is
(via macroexpansion), it should work
@U06QSF3BK but from the clojure-lsp docs I got the impression that it tries to leverage cider's run-tests so I would end up with the same problem
This doc says https://docs.cider.mx/cider/testing/supported_libraries.html that cider run-test looks into metadata for filtering tests
I haven't used midje style things myself, and haven't used metosin/testit, which seems to use clojure.test, so would think that loading a namespace with vars created by deftest should still work with cider
yes, I did and here is the macroexpand results:
(def
my-test
(fn* ([] (clojure.test/test-var #'my-test))))
may be I am doing something wrong (or not doing smth)oh! suddenly it started to work, don't know what I did though :)) suuri kiitos @U06QSF3BK
Yeah, that’s the magic link https://docs.cider.mx/cider/testing/supported_libraries.html
CIDER cares only that the clojure.test protocol being implement by some particular library and it should work fine.
I’ve avoided adding native support for different libraries as that’s a pretty slippery slope, plus in most cases you can easily run whatever tests you have in the REPL.
makes lots of sense! though this midje reference forced me to look into the different direction (emidje) @U051BLM8F Thanks for the amazing package!
Does anyone have tips on how to debug a shadow-cljs repl not connecting with cider-connect-clj&cljs
? I end up with two clj repls. Here's what I'm seeing in *Messages*
:
[nREPL] Establishing direct connection to localhost:50636 ...
[nREPL] Direct connection to localhost:50636 established
[nREPL] Establishing direct connection to localhost:50636 ...
[nREPL] Direct connection to localhost:50636 established
user-error: The shadow-cljs ClojureScript REPL is not available. Please check for details
Version info:
;; Connected to nREPL server -
;; CIDER 1.2.0snapshot (package: 20211108.621), nREPL 0.8.3
;; Clojure 1.10.3, Java 11.0.1
The project seems to be running fine. I see this in the js/console: shadow-cljs: #3 ready!
and everything at http://localhost:9630/dashboard looks fine (although I'm new to using shadow-cljs).
I'm just not sure where to look next. Does anyone know where I should look next?Oh, more info:
I'm choosing shadow-select
on the :main
build.
Some extra deps for the clojure repl:
{:extra-deps
{nrepl/nrepl {:mvn/version "0.8.3"}
refactor-nrepl/refactor-nrepl {:mvn/version "3.0.0"}
cider/cider-nrepl {:mvn/version "0.27.2"}}
:main-opts
["-m" "nrepl.cmdline" "--middleware" "[\"refactor-nrepl.middleware/wrap-refactor\",\"cider.nrepl/cider-middleware\"]"]}
Well, immediately after I post here I found this: https://shadow-cljs.github.io/docs/UsersGuide.html#_troubleshooting Perhaps this is more of a shadow-cljs issue. I'll study this and maybe post over in #shadow-cljs if I still can't figure it out.
@U067Q76EP perhaps try:
M-x cider-connect
- select localhost
and the nREPL port. Then M-x cider-connect-sibling-cljs
Not sure if that will be any different, but perhaps will bubble up a helpful error?
Yeah, it's just this code with the :sql and :xtdb aliases deleted. https://github.com/fulcrologic/fulcro-rad-demo
I shouldn't say "just" there. It's a pretty complex set of dependencies. I bet there's something wrong in there but I'm just not sure how to debug it yet.
The error you’re getting seems to indicate that the shadow-cljs
library is not loaded, as CIDER does a trivial check to see if something is around, so it can invoke code from it safely.
(defun cider-check-shadow-cljs-requirements ()
"Check whether we can start a shadow-cljs REPL."
(unless (cider-library-present-p "shadow.cljs.devtools.api")
(user-error "The shadow-cljs ClojureScript REPL is not available. Please check for details")))
If you think this has backfired for you, there’s a defcustom to disable such checks.
This sounds similar to this bug https://github.com/clojure-emacs/cider/issues/2946#issuecomment-768140666