This page is not created by, affiliated with, or supported by Slack Technologies, Inc.


I found one regression with speculative ( which I can reproduce as follows:

;; run with:

;; clj -Srepro -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.439"} org.clojure/test.check {:mvn/version "RELEASE"}}}' -m cljs.main -re node -i callstack.cljs

(ns callstack
   [clojure.spec.alpha :as s]
   [clojure.spec.test.alpha :as stest]
   [clojure.test :as t]

(s/fdef clojure.core/=
  :args (s/+ any?)
  :ret boolean?)

(t/deftest =-test
  (= 1))

(println "done, exiting...")
Error: RangeError: Maximum call stack size exceeded Used to work on 339.


FWIW, the challenge with CLJS-2956 above is that, inside the instrumented function “wrapper,” it ultimately calls apply on the plain version in order to invoke it, but with instrumentation re-enabled. The intent is to catch anything that the function itself calls. But, the instrumentation is also enabled during the mechanics of apply. So anything instrumented that is called indirectly via apply—in this case, =—can cause infinite recursion.


@mfikes I had a similar issue here First I manually unstrumented =, but later I decided to wrap it in a with-instrument-disabled, which did the trick.


is this because apply uses <=?


what has changed between 339 and 439 that this doesn’t work anymore?


@borkdude In this case, apply ultimately ends up calling = here With 1.10.339 we were using MultiFn to “overwrite various arities, and with 1.10.439, we are overwriting existing arities in a bespoke fashion, and this causes subtle differences in call patterns. I think you can still effectively run into the same sort of issue with 1.10.339, but with slightly different scenarios (if you spec apply itself, for example).


OK, perhaps apply is not an example that it occurs for.


ah, but we didn’t enable the test for it, because we ran into


The fundamental problem, as I see it, is that since the “wrapper” is implemented using ClojureScript, and a lot of the JavaScript code that is emitted in order to support the function dispatch machinery is also implemented by calling on ClojureScript core functions, it becomes meta-circular very quickly when you introduce the concept of specing core functions—and sometimes leads to infinite recursion.


A corollary: and similar tickets may only affect projects that attempt to spec core functions. “Regular” projects that spec their own non-core functions may be immune to this class of issues.


I wonder why we didn’t see this when instrumenting a lot of core functions and then running coal-mine?


looks like there is an externs inference regression in 1.10.439.


I saw AST changes happened. Are they for the compiler state? I am worried about tooling maintainers (I am the last committer of cljs-tooling). Is there a place where these changes are summarized if breaking?

thheller17:11:51 depending on how much of the AST you use some of the changes are breaking (renamed :op for example)


Thank you will check that


Looks like what I am looking for so thanks for the link once again