PHondogo
10/20/2025, 9:43 AMZac Sweers
10/20/2025, 9:36 PM// MODULE directives?Oliver.O
10/21/2025, 1:10 PMIrPluginContext.referenceFunctions(callableId: CallableId) IrGenerationExtension.generate(), but then properly resolves to a single symbol later on during IrModuleFragment.transform. The situation only occurs with the Android Gradle Library Plugin for KMP and only with Android Local tests (a.k.a. host-based tests, unit tests). Why is that? More Details in 🧵.Eugen Martynov
10/22/2025, 8:52 AMclass CafHttpResult<T> {
var result: T = null
}
But I write <T: Any> for that. Was it always like this?chrisjenx
10/22/2025, 9:53 PMYoussef Shoaib [MOD]
10/24/2025, 2:20 PMrebok
10/26/2025, 11:28 AMEugen Martynov
10/27/2025, 1:35 PMEdoardo Luppi
10/29/2025, 6:09 PMStefan Koppier
10/30/2025, 2:31 PMclass A : B
• class B : C<MyImpl>
• class <T : MyIF> C
where MyImpl : MyIf.
Does the compiler expose some functionality available in the IR stage to resolve T to MyImpl when processing IrClass A? A lot of functionality (as expected) resolves to MyIF, but I can't find any functionalitity to resolve T to MyImpl while browsing the Kotlin compiler source-code.Yang
10/31/2025, 2:16 AM-Xcompiler-plugin-ordering in 2.3? I tried https://youtrack.jetbrains.com/issue/KT-55300/Provide-a-mechanism-to-describe-ordering-and-dependencies-for-compiler-plugins#focus=Comm[…]915454.0-0 but it doesn’t seem to work so far.crowforkotlin
10/31/2025, 9:59 AMdebug autoservice, the plugin registered by this plugin is printed, but I can't debug it with breakpoints. The implementation of KotlinCompilerPluginSupportPlugin allows for breakpoint debugging, but I don't understand why.Yang
11/01/2025, 1:57 AMCHECK_COMPILER_OUTPUT directive to test IR errors in their plugin? I haven’t seen any 3rd party plugins do this so I’m wondering if it’s generally better to report errors with FIR diagnostics and test those with diagnostic tests, or test the IR errors in Gradle plugin’s integration tests?Zac Sweers
11/01/2025, 3:19 PMJavier
11/04/2025, 9:27 AM@Transient from Kotlin Serialization. It seems that something has recently changed in Kotlin Serialization — perhaps the checker has been moved to FIR — because now I'm getting the following error:
This property is marked as @Transient and therefore must have an initializing expression
I tried changing the order in which the plugins are applied, as I had a similar issue before with the AtomicFU plugin, but that workaround doesn’t work this time.
I suppose creating a fake in FIR for that property would fix the issue, but since that’s not allowed, what other workaround could I use?Youssef Shoaib [MOD]
11/04/2025, 6:19 PMelect
11/06/2025, 11:28 AMmartmists
11/09/2025, 11:26 PM// Foo.java
public interface Foo {
Bar XYZ = new Bar { ... }
}
is there a way for me to emit an irGetField for it? I tried fooKlass.getFieldByName("XYZ") but that didn't seem to work, and fooKlass.fields.toList() returns an empty list. In kotlin I'd just write Foo.XYZ.
Or is there some other way to access these fields instead of irGetField?Caleb B
11/10/2025, 3:38 PMmartmists
11/10/2025, 4:40 PMCaused by: java.lang.AssertionError: Unexpected IR element found during code generation. Either code generation for it is not implemented, or it should have been lowered:
FUN name:<anonymous> visibility:public modality:FINAL <> (it:kotlin.Any) returnType:kotlin.Any
How do I fix this? I'm trying to build a lambda, and in the parent declaration (see thread) the generated IR largely seems fine to me.y9san9
11/11/2025, 8:26 AMCaleb B
11/11/2025, 10:55 PMZac Sweers
11/12/2025, 6:38 PMCaleb B
11/12/2025, 10:06 PMcrowforkotlin
11/14/2025, 2:01 AMJonas
11/14/2025, 8:38 AMJavier
11/14/2025, 3:07 PMFqName, right? So the only workaround about this is that the Gradle Plugin uses something like Classgraph to find those references and pass them to the compiler when syncing/building?martmists
11/15/2025, 10:44 PMnull.INSTANCE, what could be the cause of this? Sample snippet where I pass a ctor reference:
val result = irCall(apply).apply {
typeArguments[0] = klass.defaultType
dispatchReceiver = product
arguments.addAll(1,
listOf(
builder,
IrFunctionReferenceImpl(
klass.startOffset,
klass.endOffset,
pluginContext.irBuiltIns.functionN(ctor.nonDispatchParameters.size).typeWith(*ctor.nonDispatchParameters.map { it.type }.toTypedArray(), klass.defaultType),
ctor.symbol,
0,
)
)
)
}Fergus Hewson
11/16/2025, 10:01 PMWARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.intellij.util.containers.Unsafe (file:/Users/fergushewson/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler/2.2.20/cdea4080fdae6867e9826af835df82e7f2b48a16/kotlin-compiler-2.2.20.jar)
WARNING: Please consider reporting this to the maintainers of class com.intellij.util.containers.Unsafe
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
I'm getting this message when writing a compiler plugin, where/how should I report this?Caleb B
11/17/2025, 12:22 AMconstexpr interpreter?