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

Create intermediate sourceset to share between Apple and non-Apple targets #45

Merged
merged 12 commits into from
Feb 19, 2022

Conversation

ankushg
Copy link
Contributor

@ankushg ankushg commented Feb 17, 2022

In this PR:

  • create nativeCoroutines as a sourceset between common and apple
  • moved the contents of apple* into nativeCoroutines*
  • created a cross-platform expect fun for freeze()
  • created PlatformError as an expect class
    • exposed as NSError on Apple and Throwable on JS
    • create an internal kotlinCause extension that we that we can use instead of digging into userInfo so the tests work on non-Apple platforms

This sourceset can be used to house the Apple-agnostic code, and can eventually be used to share code across Apple and JS 😄

Notes:

  • maybe it makes sense to keep the test cases in appleTest for now until we can successfully migrate to kotlinx-coroutine-test?

@ankushg ankushg mentioned this pull request Feb 17, 2022
26 tasks
Copy link
Owner

@rickclephas rickclephas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, let's move kotlinCause to nativeCoroutinesTest and merge this 😄

@rickclephas rickclephas merged commit 823ec70 into rickclephas:master Feb 19, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants