Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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