Fork me on GitHub
#shadow-cljs
<
2024-08-06
>
borkdude10:08:48

I'm using this expression in CLJS:

#(PersistentHashSet.createWithCheck (into-array %&))
This works with vanilla CLJS but shadow complains about:
Use of undeclared Var sci.impl.analyzer/PersistentHashSet

borkdude10:08:45

This seems to work for both cases:

#(.createWithCheck PersistentHashMap (into-array %&))

thheller08:08:12

this is because regular CLJS still treats every symbol with a dot as valid. no checks whatsoever.

thheller08:08:47

shadow checks a bit more and I guess misses something?

borkdude08:08:28

it seems shadow resolves PersistentHashSet against the current namespace and not first against core (in this particular case)

borkdude08:08:10

it's a minor issue, I already worked around this, but would be nice if shadow had the same behavior as vanilla CLJS here

thheller08:08:36

it is odd that it works with the standalone version, i.e. PersistentHashSet alone

thheller08:08:47

so I'm guessing there is a problem in the desugaring code for that

thheller08:08:04

feel free to open an issue for this. can't dig deeper currently.