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

Configuration option to auto-generate wrapped coroutines/flows? #104

Open
ankushg opened this issue Apr 10, 2023 · 1 comment
Open

Configuration option to auto-generate wrapped coroutines/flows? #104

ankushg opened this issue Apr 10, 2023 · 1 comment

Comments

@ankushg
Copy link
Contributor

ankushg commented Apr 10, 2023

Pre 1.0, the library would automatically find any suspend function or flow and create an additional wrapped function. Now, we need to annotate them manually.

It would be great if there was a way to bring the automatic behavior back with version 1.0 as a configuration option

@rickclephas
Copy link
Owner

Hi! Agreed such an option would be really nice!
Unfortunately as far as I know this isn't possible (at least not with the current Kotlin versions).

The main issue is that the NativeCoroutines annotations inherit the behaviour from the HiddenFromObjC annotation.
While it's technically possible to add annotations to the IR code via a compiler plugin, that's unfortunately too late for the ObjC generation as it uses the frontend code to generate the ObjC headers.

Anyway, I'll keep this open just in case 😄.

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