This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-06-02
Channels
- # announcements (11)
- # babashka (3)
- # beginners (54)
- # cherry (1)
- # cider (11)
- # clojure (28)
- # clojure-europe (1)
- # clojure-norway (4)
- # clojure-sweden (3)
- # clojurescript (40)
- # community-development (3)
- # cursive (12)
- # datomic (2)
- # emacs (6)
- # hyperfiddle (12)
- # missionary (14)
- # off-topic (13)
- # overtone (10)
- # re-frame (13)
- # releases (1)
- # ring (2)
- # specter (11)
- # tools-deps (7)
I think I’m getting an error due to Cursive and REPL interaction. I am running some tests and in some cases I get:
Running tests in memento.redis.listener-test
OO #object[java.util.concurrent.ConcurrentHashMap 0x55a02561 {}]
OO2 #object[java.util.concurrent.ConcurrentHashMap 0x31e2b35c {}]
PUBLISHING START #uuid "6ed849c0-dd2f-47f5-a178-decfceb465a9"
MSG :start #uuid "6ed849c0-dd2f-47f5-a178-decfceb465a9" [[:a 1]]
Error handling response - class java.lang.ClassCastException: class clojure.lang.Symbol cannot be cast to class clojure.lang.Associative (clojure.lang.Symbol and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @2eaa99)
decfceb465a9" [[:a 1]]
Error handling response - class java.lang.ClassCastException: class clojure.lang.Symbol cannot be cast to class clojure.lang.Associative (clojure.lang.Symbol and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @2eaa99)
decfceb465a9" [[:a 1]]
Error handling response - class java.lang.ClassCastException: class clojure.lang.Symbol cannot be cast to class clojure.lang.Associative (clojure.lang.Symbol and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @2eaa99)
decfceb465a9" [[:a 1]]
Error handling response - class java.lang.ClassCastException: class clojure.lang.Symbol cannot be cast to class clojure.lang.Associative (clojure.lang.Symbol and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @2eaa99)
decfceb465a9" [[:a 1]]
Error handling response - class java.lang.ClassCastException: class clojure.lang.Symbol cannot be cast to class clojure.lang.Associative (clojure.lang.Symbol and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @2eaa99)
decfceb465a9" [[:a 1]]
Error handling response - class java.lang.ClassCastException: class clojure.lang.Symbol cannot be cast to class clojure.lang.Associative (clojure.lang.Symbol and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @2eaa99)
decfceb465a9" [[:a 1]]
Error handling response - class java.lang.ClassCastException: class clojure.lang.Symbol cannot be cast to class clojure.lang.Associative (clojure.lang.Symbol and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @2eaa99)
decfceb465a9" [[:a 1]]
Error handling response - class java.lang.ClassCastException: class clojure.lang.Symbol cannot be cast to class clojure.lang.Associative (clojure.lang.Symbol and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @2eaa99)
decfceb465a9" [[:a 1]]
Error handling response - class java.lang.ClassCastException: class clojure.lang.Symbol cannot be cast to class clojure.lang.Associative (clojure.lang.Symbol and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @2eaa99)
This is all from one test runhm let me update the whole thing
I am running 1.13.1-2023.3
with the new version I don’t get this exception printed anymore
Hmm, ok. If you’re good to go for the moment, I’ll fix that logging in the next version.
Well I see it’s still a problem. The thing is that it cuts off legitimate printouts. Here’s code for a test I run in REPL many times.
(ns memento.redis.listener3-test
(:require [clojure.test :refer :all]
[taoensso.carmine :as car]))
(deftest listener-subscription-test
(testing "messages work"
(let [p (promise)]
(with-open [l (car/with-new-listener {}
(fn [[typ :as x] state]
(println x)
(when (= "message" typ)
(deliver p x))) {}
(car/subscribe "test-chan"))]
(car/wcar {}
(car/publish "test-chan" [1]))
(is (= ["message" "test-chan" [1]] @p))))))
Some times I will get this kind of a printout:
Loading test/memento/redis/listener3_test.clj... done
Running tests in memento.redis.listener3-test
[subscribe test-chan 1]
[message test-chan [1]]
[carmine carmine:listener:error {:error :conn-closed, :throwable nil, :listener #taoensso.carmine.Listener{Error handling response - class java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.Associative (clojure.lang.Keyword and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4ee15653)
[carmine carmine:listener:error {:error :conn-closed, :throwable nil, :listener #taoensso.carmine.Listener{Error handling response - class java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.Associative (clojure.lang.Keyword and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4ee15653)
[carmine carmine:listener:error {:error :conn-closed, :throwable nil, :listener #taoensso.carmine.Listener{Error handling response - class java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.Associative (clojure.lang.Keyword and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4ee15653)
[carmine carmine:listener:error {:error :conn-closed, :throwable nil, :listener #taoensso.carmine.Listener{Error handling response - class java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.Associative (clojure.lang.Keyword and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4ee15653)
[carmine carmine:listener:error {:error :conn-closed, :throwable nil, :listener #taoensso.carmine.Listener{Error handling response - class java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.Associative (clojure.lang.Keyword and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4ee15653)
[carmine carmine:listener:error {:error :conn-closed, :throwable nil, :listener #taoensso.carmine.Listener{Error handling response - class java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.Associative (clojure.lang.Keyword and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4ee15653)
[carmine carmine:listener:error {:error :conn-closed, :throwable nil, :listener #taoensso.carmine.Listener{Error handling response - class java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.Associative (clojure.lang.Keyword and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4ee15653)
[carmine carmine:listener:error {:error :conn-closed, :throwable nil, :listener #taoensso.carmine.Listener{Error handling response - class java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.Associative (clojure.lang.Keyword and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4ee15653)
[carmine carmine:listener:error {:error :conn-closed, :throwable nil, :listener #taoensso.carmine.Listener{Error handling response - class java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.Associative (clojure.lang.Keyword and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4ee15653)
[carmine carmine:listener:error {:error :conn-closed, :throwable nil, :listener #taoensso.carmine.Listener{Error handling response - class java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.Associative (clojure.lang.Keyword and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4ee15653)
[carmine carmine:listener:error {:error :conn-closed, :throwable nil, :listener #taoensso.carmine.Listener{Error handling response - class java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.Associative (clojure.lang.Keyword and clojure.lang.Associative are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4ee15653)
It cuts the print of the properties. I am not sure if just changing the logging will help, this seems to affect the app (i.e. println fails to print fully).I suspect this is something to do with the async nature of the test. I’ll try to reproduce this. That test looks self-contained, right?
Some of these lines at the beginning are my println statement trying to debug this. Error handling response…
lines are red