Alexander Ioffe
10/12/2025, 5:00 AMYoussef Shoaib [MOD]
10/12/2025, 10:29 AMConeInferenceContext or KotlinTypeRefiner in a FIR plugin. This was possible in K1 through REFINER_CAPABILITY.Zac Sweers
10/13/2025, 4:20 AMZac Sweers
10/13/2025, 10:17 PMfoo<bar even though it won't be legal in the JVM (and fail later). Java has things like Character.isJavaIdentifierPart(), is there anything/reference we should have for targeting other platforms like JS for ensuring names are safely escaped?Zac Sweers
10/16/2025, 6:47 AMtestServices.sourceFileProvider.getContentOfSourceFile(testFile) in AdditionalSourceProvider.produceAdditionalFiles() because it calls through to testServices.moduleStructure under the hood, and seems that's no longer available at that time. I can just call testFile.originalContent directly but that skips other preprocessors.
Worth filing an issue or is there a different API we should be using for this?
java.lang.IllegalStateException: No 'org.jetbrains.kotlin.test.services.TestModuleStructure'(19) in array owner: org.jetbrains.kotlin.test.services.TestServices@7af2910e
at org.jetbrains.kotlin.util.ArrayMapAccessor.getValue(ArrayMapOwner.kt:53)
at org.jetbrains.kotlin.test.services.TestModuleStructureKt.getModuleStructure(TestModuleStructure.kt:22)
at org.jetbrains.kotlin.test.preprocessors.JvmInlineSourceTransformer.process(JvmInlineSourceTransformer.kt:42)
at org.jetbrains.kotlin.test.services.SourceFileProviderImpl.getContentOfSourceFile(SourceFileProvider.kt:63)
at dev.zacsweers.metro.compiler.interop.Ksp2AdditionalSourceProvider.produceAdditionalFiles(Ksp2AdditionalSourceProvider.kt:55)Youssef Shoaib [MOD]
10/16/2025, 9:45 AMaddNewImplicitReceivers that adds context parameters instead would be very very useful. Currently, it adds extension receivers, but that has that problem of scope pollution
In fact, this could be done just by allowing it to return ImplicitValue<*>Youssef Shoaib [MOD]
10/16/2025, 1:25 PMaddNewImplicitReceivers. Is there a simple way to do that? I'm thinking of using declaration origins, but I can't see how to easily associate that with the FirFunctionCall in a way that'll persist to the Ir.
My use case is incredibly simple:
I want a call like:
with(foo, bar)
to result in 2 receivers added.
Thus in the IR I want to add variables for foo and bar, and simply replace the receiver references to instead refer to them.Youssef Shoaib [MOD]
10/16/2025, 4:14 PMaddNewImplicitReceivers signature is very hard to use. In IR, it results in either an error call (which is fine, I can work with that) or a seemingly-undetectable reference to a real extension parameter but with the wrong type (i.e. it might refer to the extension param of a local apply {}). The latter I really can't detect easily. DataFrame gets lucky because the calls one may ever want to make on the new implicit receiver are calls to fir generated properties. In my case, I have real properties and such I want to access on it. If somehow it could always be an error call, that'd be great. Ideally, I wish it'd actually keep the origin and maybe even provide a reference to the function call that resulted in this new implicit receiver (more on that in the post above)Youssef Shoaib [MOD]
10/17/2025, 2:23 AMYoussef Shoaib [MOD]
10/17/2025, 4:19 AMINFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION, which somehow surfaces those inference errors. My understanding though is that they should only be warnings, no?Youssef Shoaib [MOD]
10/17/2025, 10:24 AMNEW_INFERENCE_ERROR but only in normal compilation. When running through the test infra, the error never shows up. How come ?Desmond van der Meer
10/17/2025, 4:21 PMFrançois
10/18/2025, 9:01 AMYoussef Shoaib [MOD]
10/18/2025, 3:18 PMFirFunctionCallRefinementExtension.intercept, I get CallInfo and a FirNamedFunctionSymbol, from which I can get valueParameterSymbols. Is there an easy way to pair up those value params to the CallInfo.arguments? I can do it manually, but wondering if there's a utility in the compiler already. In other words, given some arguments and valueParameterSymbols, I want to associate the arguments to the parameters, while respecting named arguments, varargs, trailing lambdas, etc.Caleb B
10/19/2025, 11:17 PMFirReference signifies?Caleb B
10/19/2025, 11:41 PMPHondogo
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 PM