I'm seeing TestBalloon IDE plugin exceptions in IU...
# intellij
o
I'm seeing TestBalloon IDE plugin exceptions in IU-263.7307.44 which are caused by the TestBalloon compiler plugin's inability to interpret the IDE's embedded Kotlin version. Is that a new feature of 2026.3 that it enables Kotlin FIR plugins by default?
I guess this would be youtrack.jetbrains.com/issue/KTIJ-29248, but the issue is still open.
t
In addition to KTIJ-29248, you may want to take a look at KTIJ-40154 and KTIJ-40152. They deal with compiler plugins in the IDE and might be related. If they match what you’re seeing, feel free to vote, leave a comment, and to ask the team to clarify the default behavior in 2026.3.
o
Thanks for pointing me to the other issues. It seems like nothing has really changed in IJ, so presumably a user was opting in on loading non-bundled compiler plugins. I intend to fix this by adding an extra heuristic to TestBalloon, so that it can detect the matching Kotlin version when used within IJ. @Youssef Shoaib [MOD] could you please take a look if that sounds like a reasonable approach? (I am aware of dissecting the fine-grained Kotlin version ordering for
dev
and
ij
versions in Metro, but this seems to be an overkill in the TestBalloon context.)
y
Thanks for the ping! KTIJ-40152 added some explicit manifest properties to load compiler plugins into IDE; it definitely shouldn't affect you since you didn't explicitly set it up For
KotlinVersion
, you might wanna add a dependency on
kotlin-tooling-core
, which gives you
KotlinToolingVersion
I'm not super clear on what the problem is though. Is it that versions like
2.5.0-ij263-3
trip up your code? If so, then
KotlinToolingVersion
should definitely do the trick. You'll may run into some issues on Android Studio because the version it reports is something like
2.4.255
. Metro has a setup for this, and I can help port it over if you want! But definitely see first if it's causing issues or not
o
Yes, currently the
ij
versions trip up the plugin because it does not expect to be activated inside the IDE (TestBalloon does not need FIR at this point). But I guess I need to respect users which turn on non-bundled plugins and make TestBalloon behave gracefully. So I need to detect the correct TestBalloon compiler plugin version for a Kotlin version embedded in the IDE. There are two problems • There is no defined order between
-dev
versions and other non-stable versions. • There is no defined order between
-ij
versions and other non-stable versions. So unless you do the Metro dance, how do you know that a plugin built with
2.5.0-alpha3
is compatible with (i.e. not using a later build than)
2.5.0-ij263-45
?
KotlinToolingVersion
does not help here. It always assumes that a
-dev
version is lower than an
-alpha
version, being incorrect on all
-dev
builds following an
-alpha
version.
y
I agree 100% that the order of versions is difficult to ascertain In your case, you can use
AnalysisFlags.ideMode
to detect when you're running in IDE and simply early exit: https://kotlinlang.slack.com/archives/C7L3JB43G/p1790219284283659?thread_ts=1790219284.283659&cid=C7L3JB43G Or you can early exit if you detect an
ij
version
kodee loving 1
o
I guess that's a better idea than just trying a "probably compatible" plugin version, so I'll go with that. Thank you!
❤️ 1
Is there a plan to implement the suggestions of making the IDE support enabling plugins selectively or isolating them in case of crashes?
y
So KTIJ-40152 is already in the EAP (I believe, but I could be wrong) and should hopefully make it to release; it loads plugins that have an apt build range in their manifest. I am working on such isolation in KTIJ-40154, but I can't promise anything. For the time being, KEFS fills that gap
o
Sounds good: If Metro (and others) adopt KTIJ-40152, there would be no need for users to force-load all non-bundled plugins. I am aware of KEFS, but it seemed a bit heavy for my use case. Fortunately, we have arrived at a good proposal now. kodee happy
y
FWIW, IR-only plugins might still wanna run in IDE because Show Kotlin Bytecode and Evaluate Expression use the in-IDE compiler Not sure how relevant that is for TestBalloon though
o
I can experiment a bit to get an idea where and if that makes sense. Thanks for the heads-up!