clojurescript 2026-06-16

I have been very excited to try out the new refer-global behavior in 1.12.145. However, I noticed that if I follow the example in https://clojurescript.org/news/2026-05-07-release and use a top level (refer-global ...) it doesn't seem to work:

(ns my.ns)

(refer-global :only '[Promise])

(Promise/resolve 42) ; returns nil
Whereas if I put it in the ns form, it does:
(ns my.ns
  (:refer-global :only [Promise]))

(Promise/resolve 42) ; returns #object [Promise]
Am I missing something? Per the release notes the first example should work, right?

no, not in source files. source files should use the ns variant. the other is for the REPL

👍 1