clojurescript 2025-11-24

Congratulations @dnolen, this release looks spectacular!

๐ŸŽธ 1

Cool! For example, how write an array .push as a method value?

Array/.push assuming you ran (refer-global :only '[Array])

๐Ÿ™ 1

but also worth noting this runs a side-effect and returns the pushed item not the array

Yeah, not different from CLJ in that respect. doto โค๏ธ

set the channel topic: ClojureScript, a dialect of Clojure that compiles to JavaScript http://clojurescript.org | Currently at 1.12.116

Congrats on the new cljs release! I gave it a whirl on one of my projects and am wondering if it works with cljs-test-runner. ๐Ÿงต

Maybe easier if we work from cljs-test-runner tests.

$ git clone git@github.com:Olical/cljs-test-runner.git
$ cd cljs-test-runner
Try test runner tests:
$ ./scripts/test
WARNING: Implicit use of clojure.main with options is deprecated, use -M -m cljs-test-runner.main

Testing example.partial-test

Testing example.yes-test

Ran 3 tests containing 3 assertions.
0 failures, 0 errors.
Looks good. Now if I bump clojurescript to 1.12.116 in deps.edn and retry, I get:
$ ./scripts/test
WARNING: Implicit use of clojure.main with options is deprecated, use -M -m cljs-test-runner.main
WARNING: ->Vector already refers to: cljs.core/->Vector being replaced by: clojure.core.rrb-vector.rrbt/->Vector at line 268 cljs-test-runner-out/clojure/core/rrb_vector/rrbt.cljs
WARNING: Wrong number of args (6) passed to cljs.core/Vector at line 268 cljs-test-runner-out/clojure/core/rrb_vector/rrbt.cljs
WARNING: ->Vector already refers to: cljs.core/->Vector being replaced by: clojure.core.rrb-vector.rrbt/->Vector at line 268 cljs-test-runner-out/clojure/core/rrb_vector/rrbt.cljs
WARNING: Wrong number of args (6) passed to cljs.core/Vector at line 268 cljs-test-runner-out/clojure/core/rrb_vector/rrbt.cljs
/home/lee/boop/cljs-test-runner/cljs-test-runner-out/clojure/core/rrb_vector/rrbt.js:512
(clojure.core.rrb_vector.rrbt.Vector.prototype.toString = (function (){
                                     ^

TypeError: Cannot read properties of undefined (reading 'prototype')
    at Object. (/home/lee/boop/cljs-test-runner/cljs-test-runner-out/clojure/core/rrb_vector/rrbt.js:512:38)
    at Module._compile (node:internal/modules/cjs/loader:1688:14)
    at Object..js (node:internal/modules/cjs/loader:1820:10)
    at Module.load (node:internal/modules/cjs/loader:1423:32)
    at Function._load (node:internal/modules/cjs/loader:1246:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
    at Module.require (node:internal/modules/cjs/loader:1445:12)
    at require (node:internal/modules/helpers:135:16)
    at global.CLOSURE_IMPORT_SCRIPT (/home/lee/boop/cljs-test-runner/cljs-test-runner-out/goog/bootstrap/nodejs.js:88:13)

Node.js v22.18.0
I'm no expert ClojureScript guy, it could very well be that I'm missing something.

high priority will fix soon

โค๏ธ 1

Thanks @dnolen, that commit works for me! What I did to test: From a clone of clojurescript:

$ git checkout 8757eaabe952d329db83940d31718ccab019886e
$ ./script/build
This built and installed a local version 1.12.118 for me. Then I re-ran cljs-test-runner ./scripts/test as above but against this local version, and this time it worked. I also tried my local 1.12.118 with rewrite-clj cljs tests, and they now also work.

@dnolen hmm, these two warnings seem to be contradictory no?

WARNING: ->Vector already refers to: cljs.core/->Vector being replaced by: clojure.core.rrb-vector.rrbt/->Vector at line 268 cljs-test-runner-out/clojure/core/rrb_vector/rrbt.cljs
WARNING: Wrong number of args (6) passed to cljs.core/Vector at line 268 cljs-test-runner-out/clojure/core/rrb_vector/rrbt.cljs
One warning about rrb vector overriding cljs.core/->Vector and then one warnig about cljs.core/Vector being called with the wrong amount of args. rrbt.cljs does have a (deftype Vector []). It seems some resolution here isn't working?

So if I would have a (deftype VectorLite []) in my program, would I get a similar problem back?

no idea, but that's unrelated to the fix that I pushed. It's hard to made any conclusions about this other issue since whatever it might be it's not about lite-mode anymore.

I just quoted the warnings that @lee posted, before the fix

yes, but my feeling is this other thing is probably not new is all

since the fix you posted just renames things, I would assume that the same problem would occur when you use the new name for deftype somewhere

so yes there's a problem - but maybe an old problem - even that I'm not sure about.

the warnings are strange in that you would expect to see multiple bad ctor warnings in that namespace

could it be that lite-mode emits some unqualified form? just double checking

oh wait, lread isn't even using lite-mode, so probably not the issue

sorry for bothering :)

Same warnings as borkdude quoted, started to happen after updating to newest clojurescript release. Running on development so no lite-mode/elide-to-string

already fixed in master, a new release tomorrow probably

โค๏ธ 2