Can anyone think of a reason why `./gradlew browse...
# javascript
b
Can anyone think of a reason why
./gradlew browserDevelopmentRun
would throw the following error in Chrome and Safari but otherwise work in Firefox?
Copy code
Uncaught TypeError: _this__u8e3s4.get_first_irdx8n_k$ is not a function
    at get_LHS (CFG.kt?0f81:15:32)
    at getParametersIn (CFG.kt?0f81:120:32)
    at eliminateParametricityFromLHS (CFG.kt?0f81:136:31)
    at normalize (Standard.kt?4256:138:43)
    at normalForm$delegate$lambda (CFG.kt?0f81:32:36)
    at eval (Graph.kt?c30b:185:29)
    at protoOf.getOrPut_x8bkas_k$ (Standard.kt?4256:13:31)
    at sam$kotlin_properties_ReadOnlyProperty$0.eval [as function_1] (Graph.kt?c30b:185:11)
    at protoOf.getValue_4lco8v_k$ (galoisenne.js:14950:17)
    at get_normalForm (CFG.kt?0f81:32:28)
Here is the relevant context for the Kotlin code in question:
Copy code
typealias Π2<A, B> = Pair<A, B>
typealias Σᐩ = String
typealias Production = Π2<Σᐩ, List<Σᐩ>>
typealias CFG = Set<Production>

val Production.LHS: Σᐩ get() = first
c
there’s a lot of special symbols there - perhaps they aren’t making the trip to JS very well.
🤔 1
b
I thought that too, but the error still occurs after renaming to ASCII. And only on Chrome / Safari...
c
interesting. does
_this__u8e3s4.get_first_irdx8n_k$
exist and look like a function?
b
I was looking but didn't see it defined anywhere in the generated JS
All of the usages seem to be callers
c
hmmm. perhaps the name mangling is problematic - does the containing object exist (outside of callers into it)?
_this__u8e3s4
a
kotlin version??
b
It seems to just be a variable name for the extension receiver. I'm using
1.8.20-Beta
Also seems to appear quite frequently inside the JS-compiled Kotlin stdlib, but no declaration.
c
is it possible the JS files are included out-of-order in the browser?
b
Well there's only a single script file so I'm not sure how that could happen. FF loads and runs without an error, Safari fails
a
With kotlin/js, i reaised sometimes just running a clean build can work. Did you try that?? running a clean build?
b
Yes, I tried cleaning the project and restarting via
./gradlew clean kotlinUpgradeYarnLock browserDevelopmentRun --continuous
, same error
c
looks like Safari is loading the JS file from cache - perhaps try clearing out / disabling the browser cache.
b
Same issue with the cache cleared & disabled
Maybe I'll just submit a ticket
Thanks for your suggestions
👍 1
c
yea could be the beta Kotlin.