This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-29
Channels
- # aws (8)
- # babashka (45)
- # beginners (83)
- # cider (23)
- # clj-on-windows (4)
- # cljdoc (23)
- # clojars (6)
- # clojure (68)
- # clojure-dev (33)
- # clojure-europe (75)
- # clojure-nl (1)
- # clojure-uk (4)
- # clojurescript (14)
- # conjure (6)
- # data-science (15)
- # datascript (7)
- # datomic (47)
- # docker (15)
- # events (1)
- # fulcro (4)
- # graphql (3)
- # jobs (4)
- # lsp (14)
- # nginx (2)
- # nrepl (2)
- # off-topic (41)
- # pathom (18)
- # pedestal (1)
- # polylith (72)
- # reitit (8)
- # reveal (1)
- # shadow-cljs (48)
- # tools-build (11)
- # tools-deps (24)
- # xtdb (8)
Hi, I seem to be having an issue running tests on cider. I have setup a :once use-fixtures. When running directly lein test, the test that needs the fixture passes, but when running cider-tests it doesn't. Adding a println line within the fixture I can see cider actually printing it, so not 100% sure what is going on, and the documentation doesn't make any reference.
a somewhat usual suspect is that under the Lein runner, *ns*
is always user
. In an interactive CIDER session it can easily change
The fixture setups dynamodb-local. So it fails because it thinks dynamodb-local hasn't been setup (actually because the table cannot be found). The fixture and the test are on the same namespace. The table and the dynamo local are being taken care of in the fixture after the (f)
call.
You can always try (clojure.test/run-tests)
from the CIDER repl. That might narrow down things
Otherwise place assert
s strategically for ensuring whatever assumptions you have about the test setup hold true
(clojure.test/run-tests)
works when switching into the namespace (which is why I was expecting). Will need to investigate a bit more about the behaviour of cider.
The specific error returned is {:type com.amazonaws.dynamodb.v20120810#ResourceNotFoundException, , :Message Cannot do operations on a non-existent table ...
(i am using cognitec.aws)
The setup of the fixture is like
(setup dynamo-process)
(reset! client (aws/client ...))
(aws/invoke @client ... :CreateTable ...)
(f)
(aws/invoke @client ... :DeleteTable)
(reset! client nil)
(stop dynamo-process)
Somehow I am thinking that the (f)
is executed out of order ... or is it possible that the fixture gets called, but the test is not run inside the http://fixture.eeare you sure aws/invoke
is a sync/blocking operation? Maybe CIDER is running things too fast?
either way println
and assert
are your friends, this way you can get an idea of what is going on (in what order)
Ah, awesome, so the issue is that the client, for some reason, can't access the process (it is done through an http endpoint). The order of calls was fine. The server created using (.exec (Runtime/getRuntime ...)
is not accessible on Cider. Ok, now that smells like I am not doing something I need to do
There is an async version of invoke, but is on a different namespace. I will keep looking at it.
I have a problem connecting to a clojurescript repl. If I run cider-connect-cljs from a clojure project I get the following error: helm-M-x-execute-command: Symbol’s function definition is void: parseclj-alist. It works fine if I run it from non clojure project file. Any ideas?
Turns out it was a bug in cider/parseclj. I updated to parseclj 1.0.4 and it fixed the problem.
Hello, got a problem but I am not sure whether it's due to emacs, prelude or cider. The problem is that every now and then something happens that starts activating something in the minibuffer that starts asking for a Lisp Expression, which I can apparently cancel with C-g
or just by typing something into it. But after that happens the first time it continues to happen whenever I type a few characters. I have no idea how I am activating it, but it happens often and the only solution I have found is to restart emacs. Any ideas why this happens and how can I deactivate it once it gets started?
I have that quite often lately.... Did not find an other way the quitting cider or even restart emacs. Any workaround is welcome.
I use doom, so even an other Emax distribution
@U7AMPCPU2 try M-x toggle-debug-on-error and it should give a stack trace the next time you C-g out of the prompt
thanks @UCPS050BV I'll try that
@U7AMPCPU2 Did you find anything ? I have this issue very often , and it is very annoying. It seems to be related to "company mode". Or at least "from time to time " 2 things happen to me, company mode gets crazy (popup is loosing focus, completions via 'tab' does not do anything anymore) After some random pressing of "C-g" and "C-c C-c" then I get the "Lisp expression" issue. For me only emacs restart solves it so far
hmm, not really, but disabling company-mode has been the best so far