Why are pre-release versions of Kotlin being used ...
# webassembly
e
Why are pre-release versions of Kotlin being used in released libraries (kotlinx-browser in this case):
Copy code
w: The version of the Kotlin/Wasm standard library (2.2.20-Beta2-release-177) differs from the version of the compiler (2.2.0). Please, note that while Kotlin/Wasm is in active development phase only matching versions are supported.
Please, make sure that the standard library has the same version as the compiler. Adjust your project's settings if necessary.
e: warnings found and -Werror specified
j
It's documented as requiring such
Seems like it allowed the commonization of the js and wasmJs code
e
The documentation was added at the same time as the requirement which was after I started using it 🙃 I guess they do mention that
Note that the library is experimental, and the API is subject to change.
but I didn't expect that to mean requiring pre-release versions.
j
Yeah it's annoying. I tend to write my own/copy in externals anyway, but we had one usage where CI tripped up on the Renovate upgrade PR and I had to go look.
same 1
t
> I tend to write my own/copy in externals anyway @jw do you mean own browser declarations?
j
Yes
t
Multiplatform kotlin-browser is already here
We use stable Kotlin only
We cover 100% of stable browser API. Or you need something else?
e
What's the difference between them (other than stability)?
j
I mostly just don't want the added dependency
Like you said, the APIs are stable so you spend 5 minutes writing your own and then you're done forever
t
Stable = works in 2+ browsers 😉
What's the difference between them (other than stability)?
1. More declarations 2. More strictness (method parameters, event types) 3. Safe JSO factories (JS platform only) 4.
suspend
adapters for Promise APIs
j
My opinion was just for libraries, which often use a very limited subset anyway. If it were building an app I would totally pull that in.
🚀 1