Skip to content
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

Separate coroutines-enabled code #2478

Closed
lppedd opened this issue Sep 6, 2024 · 1 comment
Closed

Separate coroutines-enabled code #2478

lppedd opened this issue Sep 6, 2024 · 1 comment
Assignees

Comments

@lppedd
Copy link
Contributor

lppedd commented Sep 6, 2024

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

@turansky turansky self-assigned this Sep 6, 2024
@turansky
Copy link
Collaborator

turansky commented Sep 6, 2024

  1. Our current strategy is to enforce suspend calls over Promise calls.
  2. Solution for kotlinx-io and similar libraries - exclude coroutines from transitive dependencies.
  3. Additional changes from Kotlin Wrappers isn't expected.

@turansky turansky closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants