-
Notifications
You must be signed in to change notification settings - Fork 5
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 support for new Kotlin K2 mode. #49
Comments
Thanks for reporting @sureshg. The IntelliJ plugin is a bit outdated by now. I'm pretty sure K2 wasn't even a thing back then.
|
@sureshg I could not find the option when debugging the plugin with the latest IntelliJ version (2024.2.1, Community Edition). The quick action search somehow suggested this section, but when opening it there was no checkbox. Nevertheless, I've created a new version of the jte plugin, since quite a few things have piled up there since the last release. The release 2.2.0 is out the door and now pending Jetbrains Approval. Would be interested to see if this solves the problem with K2. The only info regarding this I found was this blog post, which is a bit outdated by now but haven't found anything newer:
Which sounds like it won't work? Or, maybe they got it working without plugin authors doing anything.. |
@casid I am not sure about that. Anyway, I can test |
@casid |
jfyi: they have published the migration guide - https://blog.jetbrains.com/platform/2024/09/migrating-your-kotlin-plugin-to-k2-mode/ |
@sureshg sorry for the late reply! Jetbrains rejected the update, because the plugin is using an internal API. This hasn't been a problem before, but I think with the new publishing plugin they got a bit stricter about it. The internal API isn't used for a core feature, so it doesn't look too bad. Its a convenience thing, that when typing If you want to give it a try, you could download the latest version here and install it manually. Thanks for sharing the migration guide! I think next Friday I should have some slack time at work to look into the plugin. |
@casid thanks..plugin |
@sureshg I looked through my code and it looks like I don't use the packages listed in the migration article. I've marked the plugin as compatible with K2 in the plugin.xml and published a new version. This one also has the internal API usage removed. If you don't want to wait for approval, you can have a look at it here already: |
@casid Thanks, the plugin is enabled ( |
Oh no, that does not look good. It kinda looks like the language injection approach the plugin uses does not work the same as it did in K2 mode. When switching back to the previous mode it is working, I guess? |
Do you have any ideas how to fix that issue? Can I support somehow? |
Thank you for asking! That's the thing. I don't have any good idea how to fix it. So far I only have:
That being said, I'm currently hoping and doing option 3. |
Thank you for your thoughts on this. Is there any possibility how to test the plugin locally in the IDE with the checked out code from this repository? |
Sorry for the late reply, I just returned from a long vacation! Yes, you can just clone the repository and then run the |
Since IJ2024.2, the new k2 compiler mode is in beta and ready for most of the use cases.
But after enabling k2, JTE plugin stopped working.
Please add support for the new k2 mode.
The text was updated successfully, but these errors were encountered: