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

Add ElementType.TYPE to ActorType to enable it in Kotlin #797

Closed
LionTao opened this issue Oct 9, 2022 · 6 comments · Fixed by #812
Closed

Add ElementType.TYPE to ActorType to enable it in Kotlin #797

LionTao opened this issue Oct 9, 2022 · 6 comments · Fixed by #812
Assignees
Labels
P2 triaged/resolved Items triaged and ready
Milestone

Comments

@LionTao
Copy link
Contributor

LionTao commented Oct 9, 2022

Describe the proposal

Hi, I want to use the actor model with Kotlin. Currently, the ActorType annotation in java is targeted at ElementType.TYPE_USE which is incompatible with kotlin interface.
Adding ElementType.TYPE to the annotation target field should work. Can we add it?

@artursouza
Copy link
Member

Overall I am inclined. But what would be the difference?

@artursouza artursouza added the P2 label Nov 7, 2022
@LionTao
Copy link
Contributor Author

LionTao commented Nov 7, 2022

Overall I am inclined. But what would be the difference?

That would allow writing actor interfaces in kotlin.
Currently I want to write my actor implemtation in kotlin but I have to write a java actor interface to use the java sdk features.

@mukundansundar
Copy link
Contributor

@LionTao Will you be able to contribute a PR for this change?

@LionTao
Copy link
Contributor Author

LionTao commented Nov 21, 2022

@LionTao Will you be able to contribute a PR for this change?

Of course, created #812

@mukundansundar
Copy link
Contributor

@LionTao Could you provide some documentation link in the PR or in this issue which explains why ElementType.Type is needed for Kotlin?

@mukundansundar mukundansundar added this to the v1.8 milestone Nov 21, 2022
@mukundansundar mukundansundar added the triaged/resolved Items triaged and ready label Nov 21, 2022
@LionTao
Copy link
Contributor Author

LionTao commented Nov 21, 2022

@LionTao Could you provide some documentation link in the PR or in this issue that explains why ElementType.Type is needed for Kotlin?

According to Kotlin docs, it seems currently kotlin lacks some native java ElementType enum values.

For my project, rewriting the ActorType annotation class with ElementType.TYPE will let it annotate a kotlin interface. Otherwise, the kotlin compiler throws an error that says This annotation is not applicable to target 'interface'.

@artursouza artursouza changed the title Add ElementType.TYPE to ActorType Add ElementType.TYPE to ActorType to enable it in Kotlin Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 triaged/resolved Items triaged and ready
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants