Autodesk / coroutineworker

Kotlin Coroutine-based workers for native
Apache License 2.0
370 stars 24 forks source link

Added Java script support since it's very popular :: taco emoji #55

Closed elkhoudiry closed 4 years ago

elkhoudiry commented 4 years ago

Added Java script support since it's very popular and 3rd parties libaries that support it will conflict with this great library.

Modified the build.gradle.kts file.

Created the module.

but the jsTest compilation fails in some situations (not building the library direct) since JS doesn't have runBlock { .. } and the tests should be replaced as described here in this issue:

https://youtrack.jetbrains.com/issue/KT-22228

java script runBlocking situation : https://github.com/Kotlin/kotlinx.coroutines/tree/native-mt#native

benasher44 commented 4 years ago

Thanks for this PR! I haven't spent a lot of time with Kotlin/JS yet, but I'm going to do some research and then give this a look later on in the week

elkhoudiry commented 4 years ago

anytime, i just added a basic Kotlin/JS support, because my project was conflicting with the library, i left the operations to the normal kotlinx-coroutines-core-js library, just like the JVM support.

during my tests JS web app and IOS app where running fine with common code.

but the all the tests depends on runBlocking { .. } which blocks the thread until it returns with a result, but runBlocking { .. } style isn't supported in Kotlin/JS which is making the tests fail.

benasher44 commented 4 years ago

Changes generally look good! I'll merge after the build.gradle.kts cleanup. thanks!

elkhoudiry commented 4 years ago

thank you :) , so i cleaned up the build.gradle.kts is it ready now ? or it needs more modification ?

benasher44 commented 4 years ago

much better thanks! almost ready. just a few last questions + you'll need to update this branch with master to resolve the conflicts

elkhoudiry commented 4 years ago

thank you so much, you helped alot, and i learned more stuff from you. good luck to you.