-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] JS Support #43
base: master
Are you sure you want to change the base?
[WIP] JS Support #43
Conversation
…esets goes between common and js/apple
- replace backtick/space method names - remove tests for freezing
this compiles, but doesn't pass on Kotlin/Native 😔
An |
We should probably add a react client to the sample as discussed in #17 (comment).
Not 100% sure, but I think we won't need the |
Work toward #17
Let's get JS support working in here!
To Extract into Separate PRs
nativeCoroutines
JS-friendlykotlinx-coroutines-test
: Prepare tests for kotlinx-coroutines-test #46appleTest
213f541nativeCoroutines
sourceset Add JS as a target for kmp-nativecoroutines-core #48CoroutineScope
for JS targetapple
andjs
blocksOpen Questions
@JsExport
? or are the typealiases fine if we just@JsExport
the entire class in commonMain? Though we get warnings for this if it has a public suspend fun…Done in this PR (will be separated into separate PRs)
Main Code
supportedTarget
as a sourceset betweencommon
andapple
/js
expect fun
forfreeze()
PlatformError
as anexpect class
NSError
on Apple andThrowable
on JSkotlinCause
extension that we that we can use instead of digging intouserInfo
so the tests work on non-Apple platformsTests
AtomicInt
to atomicfuAtomicInt
(extracted to this PR: )appleTest
intosupportedTargetTest
fun `test method with spaces()`
tofun test_method_with_underscores()
because JS doesn't support spaces (even with backticks)supportedTargetTest
Remaining
runBlocking
torunTest
(fromkotlinx-coroutines-test
)supportedTargetTest
are passing in JSsupportedTargetTest
are currently gettingInvalidMutabilityException
s on NativeAppleNative____
tests and only leave freezing ones in there