-
Notifications
You must be signed in to change notification settings - Fork 28
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
build: Improved hotswap behavior for the IDE's JVM when executed via the runIde
Gradle task.
#654
build: Improved hotswap behavior for the IDE's JVM when executed via the runIde
Gradle task.
#654
Conversation
…nIde" Gradle task.
runIde
Gradle task.runIde
Gradle task.
Please rebase your PR against master, we're keeping a linear git history. Merge commits are likely messing up with the conventional commits check |
runIde
Gradle task.runIde
Gradle task.
I have tried the PR, but I cannot start the plugin:
|
@SCWells72 have you installed some external plugin? In my case I can start runIde (see my previous comment). |
…ionally based on the IDE version. 2023.2/3 versions don't support them, but 2024.1+ versions do. Once 2023.* versions are no longer supported, these JVM args can be added unconditionally.
val platformVersion = properties("platformVersion").getOrNull() | ||
return when (platformVersion) { | ||
// Versions before 2024.1 don't support enhanced class redefinition | ||
"2023.2", "2023.3" -> false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've explicitly verified the correct behavior in 2023.2, 2023.3, 2024.1, 2024.2, and 2024.3. By "correct behavior", I mean that runIde
actually does run an IDE instance of the specified platformVersion
, and once started, only simple classloader hotswaps are supported on 2023.* and enhanced classloader hotswaps are supported on 2024.*.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SCWells72: that's great news, thanks for sharing!
@SCWells72 it works like a charm. Thanks so much for this great PR. It will change my life :) |
Pretty much what it says in the title. This allows dynamic updates to the running IDE JVM instance for most changes. Changes to class constant values and significant restructuring of Java/Kotlin types will require a JVM restart, but most other changes -- including simple method extractions and such -- will not.
Once you did some Java code changes, you need to build project
(ex: Ctrl+F9 on Windows) and your changes is applied without restarting the IntelliJ! This feature works only for IJ > 2024.1