cljs-dev

dominicm 2025-11-30T10:24:47.898239Z

For the proxy stuff, is there a reason this isn't working?

(aget ((cljs.proxy/builder) [{}]) 0)
I get:
;!Execution error (TypeError) at (<cljs repl>:1).
;!proxy must report the same value for the non-writable, non-configurable property '"cljs$lang$protocol_mask$partition0$"'
It seems to not appreciate the nested map but the docs claim to handle recursion. The docstring example works OK:
(def foo (proxy [{:foo 1 :bar 2}]))
   (-> foo (aget 0) (o/get "foo"))
The proxy doesn't seem to be compatible with for (... of ...) syntax either, which is how I discovered the above:
(set! (.-y js/window) (proxy ["foo"]))
with: for (const x of y) {console.log(x)} gives:
Uncaught TypeError: can't convert symbol to number
    get proxy.cljs:50
    <anonymous> debugger eval code:1

dnolen 2025-11-30T14:33:31.315929Z

it would be good to capture browser, I've tested mostly against Node REPL and w/ Safari, but I did basic validation in Chrome and Firefox.

dominicm 2025-11-30T14:33:46.186059Z

I did this all in Firefox.

dnolen 2025-11-30T14:34:08.644239Z

Ok trying this specific thing in Firefox

dnolen 2025-11-30T14:37:16.316059Z

worked fine in Firefox

dominicm 2025-11-30T14:40:43.343209Z

Ok. I'll try and figure out what's messed this up. I assumed this was simple enough to not be influenced by outside factors. How often I'm wrong! I hope the for...of thing is good though as it's mostly browser based rather than repl. But maybe my proxy namespace is all building wrong.

dnolen 2025-11-30T15:05:04.409129Z

replicated the for ... in issue here

dnolen 2025-11-30T15:50:19.996479Z

ok, fixed some things, but this is a recursive case that has to be properly handled

dnolen 2025-11-30T15:50:57.162829Z

wip here https://github.com/clojure/clojurescript/pull/298

dnolen 2025-11-30T15:51:54.607769Z

might not get to it today, but this should be fixed up before the next release, thanks for the report!

dnolen 2025-11-30T20:16:52.054349Z

ok the obvious bugs fixed https://github.com/clojure/clojurescript/commit/9a55107a23f6d8fe1a9c8f5ece623f6fa1c6aeab

dnolen 2025-11-30T14:30:51.408519Z

(aget ((cljs.proxy/builder) [{}]) 0) works fine for me at the REPL, can you create something minimal w/ master?

dnolen 2025-11-30T14:31:03.830889Z

@dominicm ^

dominicm 2025-11-30T14:32:07.943609Z

Hmm, I'll have a go. Strange.