Skip to content

Support K2 mode in the IJ plugin#5138

Merged
Victor Kropp (kropp) merged 5 commits into
JetBrains:masterfrom
rock3r:support-k2-mode
Nov 7, 2024
Merged

Support K2 mode in the IJ plugin#5138
Victor Kropp (kropp) merged 5 commits into
JetBrains:masterfrom
rock3r:support-k2-mode

Conversation

@rock3r

@rock3r Sebastiano Poggi (rock3r) commented Sep 14, 2024

Copy link
Copy Markdown
Contributor

This PR makes the IJ plugin run in K2 mode with the new Analysis APIs, instead of the old K1 APIs. It also includes cleaning up a bunch of compiler warnings, and some mistakes I saw when migrating to K2.

I have tested it on my own machine and it seems to work, both in IJ 243 EAP1 and 242.1, but I'd recommend you try it out too. Also, I don't have any Compose Web-based project to test the related changes with.

Important

Requires #5137 to be merged first.

Release Notes

Features - Desktop

  • Compose plugin for IntelliJ IDEA now supports K2 mode

val projectRefreshListener = ConfigurePreviewTaskNameCacheInvalidator(configurePreviewTaskNameCache)
ExternalSystemProgressNotificationManager.getInstance()
.addNotificationListener(projectRefreshListener, myProject)
.addNotificationListener(projectRefreshListener, this)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what is the expected behaviour here — the service was marked as an app-level service and the project used as disposable, but using Project as disposable is bad. It feels like the service should be project-level, so this subscription would maintain the same scope, but I don't know if it's the right way to go about it.

1. Migrate to IJP Gradle plugin 2.x
2. Upgrade Gradle to 8.10
3. Bump IJ target to 2024.2.1
4. Clean up after migration
This makes the IJ plugin run in K2 mode with the new Analysis APIs,
instead of the old K1 APIs.
@kropp Victor Kropp (kropp) merged commit 1b877dd into JetBrains:master Nov 7, 2024
@rock3r Sebastiano Poggi (rock3r) deleted the support-k2-mode branch November 19, 2024 21:10
Victor Kropp (kropp) added a commit that referenced this pull request Dec 12, 2024
This PR makes the IJ plugin run in K2 mode with the new Analysis APIs,
instead of the old K1 APIs. It also includes cleaning up a bunch of
compiler warnings, and some mistakes I saw when migrating to K2.

---------

Co-authored-by: Victor Kropp <victor.kropp@jetbrains.com>
(cherry picked from commit 1b877dd)
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.

2 participants