Separate coroutines-enabled code
Closed this issue · 1 comments
lppedd commented
I've noticed that many modules, including the most basic kotlin-js
one, add a dependency on coroutines.
I think it's surprising to see kotlinx-coroutines in a JS wrappers project, so I'd like to propose splitting the code.
For example:
kotlin-js
- pure wrapperskotlin-js-coroutines
- build on top ofkotlin-js
and adds coroutines support
The same concept could be applied to other modules.
This could favor better dependency management from a consumer perspective, and encourage kotlinx libraries to adopt kotlin-wrappers types. For example, see discussion in kotlinx-io PR.
turansky commented
- Our current strategy is to enforce
suspend
calls overPromise
calls. - Solution for
kotlinx-io
and similar libraries - excludecoroutines
from transitive dependencies. - Additional changes from Kotlin Wrappers isn't expected.