This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-16
Channels
- # announcements (22)
- # beginners (4)
- # biff (4)
- # cider (5)
- # clerk (3)
- # clojure (28)
- # clojure-chennai (1)
- # clojure-europe (23)
- # clojure-gamedev (7)
- # clojure-korea (5)
- # clojure-madison (3)
- # clojure-my (1)
- # clojure-nl (1)
- # clojure-norway (49)
- # clojure-sweden (7)
- # clojure-uk (4)
- # clojuredesign-podcast (14)
- # clojurescript (10)
- # clr (5)
- # cursive (4)
- # datascript (17)
- # datomic (2)
- # events (1)
- # garden (1)
- # introduce-yourself (2)
- # jobs-discuss (14)
- # lsp (23)
- # malli (14)
- # missionary (9)
- # off-topic (109)
- # overtone (7)
- # polylith (5)
- # releases (5)
- # shadow-cljs (7)
- # sql (13)
- # testing (30)
- # xtdb (10)
- # yamlscript (44)
Hi, I will report outside of the thread, I was able to get async to load at least with some manual "println" tracing. Basic problem comes down to this kind of construct (in the tools.analyzer code):
(def foo [recur? & [opts]] (when recur? (recur false [opts])))
Running (foo true)
, will get the exception.
It appears likely you'll have to move to 1.12.0-alpha(latest). There was a bug report that explicitly mentioned two things appear in your report. (1) Your load error was occurring on a call to tools.analyzer.passes/schedule
-- that function is explicitly mentioned in the bug report. (2) The specific code example given in the bug report that illustrates the problem is
(defn yikes [i & [opts]]
(if (<= i 0)
7
(recur (dec i) [opts])))
Which looks very much like your function foo
mentioned above.
The bug report is here: https://clojure.atlassian.net/jira/software/c/projects/CLJCLR/issues/CLJCLR-113
It was a code-gen issue that doesn't seem to bother ClojureJVM but it did trip up ClojureCLR.
(It is actually also a bug in ClojureJVM (@alexmiller, but the simple example we have does not cause the problem.
You have to work really hard to manifest it in ClojureJVM:
PS C:\Users\dmill> clj
Clojure 1.11.1
user=> (defn yikes-again [i & [opts :as all]]
(if (<= i 0)
(clojure.lang.RT/seqToArray all)
(recur (dec i) [opts])))
#'user/yikes-again
user=> (yikes-again -1) ;; does not recur, so it runs okay
#object["[Ljava.lang.Object;" 0x5c0f79f0 "[Ljava.lang.Object;@5c0f79f0"]
user=> (yikes-again 4) ;; recurs, the recurrence ends up sticking a PersistentVector in a local typed as an ISeq.
Execution error (ClassCastException) at user/yikes-again (REPL:2).
class clojure.lang.PersistentVector cannot be cast to class clojure.lang.ISeq (clojure.lang.PersistentVector and clojure.lang.ISeq are in unnamed module of loader 'app'
TL;DR: switch to 1.12.0-alpha -- The code is actually really stable.Thank you for the advice, I will do so! (currently running with custom analyzer code and everything I've tried with async works so far)