Skip to content

Separate coroutines-enabled code #2478

@lppedd

Description

@lppedd

I've noticed that many modules, including the most basic kotlin-js one, add a dependency on coroutines.

jsMainImplementation(libs.coroutines.core)

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 wrappers
  • kotlin-js-coroutines - build on top of kotlin-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.


Related discussion

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions