Ousc
08/23/2025, 3:42 PMOusc
08/23/2025, 6:13 PMZac Sweers
08/24/2025, 9:25 PMIrDiagnosticReporter
on declarations that originate from Java, it seems there's never a file present. Is this a bug or should we check for this and report it to MessageCollector
instead? This is with 2.2.20-RCOliver.O
08/25/2025, 12:55 PMKLIB resolver: The same 'unique_name=kotlin-stdlib-common' found in more than one library: .../testBalloon/testBalloon-framework-core/build/kotlinTransformedMetadataLibraries/commonMain/org.jetbrains.kotlin-kotlin-stdlib-2.2.20-RC-commonMain-Y8sbrw.klib, .../testBalloon/testBalloon-framework-core/build/kotlinTransformedMetadataLibraries/nonJvmMain/org.jetbrains.kotlin-kotlin-stdlib-2.2.20-RC-commonNonJvmMain-Y8sbrw.klib
Zac Sweers
08/26/2025, 4:28 AMThe following LookupSymbols are not yet converted to ProgramSymbols
for those symbols
@ralf filed a detailed report and repro link here.
It seems to come from this line, and I wonder if there is another edge case that may need to be carved out above it? I'm not sure how to debug this as attaching a debugger/running the compiler in process disables IC 😕Willem Veelenturf
08/27/2025, 6:19 AMJonas
08/27/2025, 7:34 AM__FILE__
as tag) and cite replaces this afterwards with the file where it was injected.
To use both metro and cite simultaneously in a project works fine, but it seems like cite runs first as I always get the file where I declare the dependency not where I use it. Even if I list cite after metro in the plugins configuration.
An explicit ordering of compiler plugins is planned with version 2.3.0, would this solve this use case or do I have a conceptual issue here?
cc.: @Zac Sweers @jw
Thanks in advance for your input.Scott Sosna
08/27/2025, 4:41 PMCurtis Kroetsch
08/27/2025, 8:25 PMorg.jetbrains.kotlin.fir.symbols.impl.FirValueParameterSymbol: method 'void <init>()' not found
Is there a way to control the version the IDE and match what version my plugin is using? Or any other way to develop on a newer version?theapache64
08/29/2025, 5:54 AMKotlin Code → Kotlin IR → Kotlin/JS Compiler → JavaScript
does this mean I could theoretically create a Kotlin/C++ compiler (or is it called transpiler?) by building a new backend that transforms Kotlin IR into C++ code,
similar to how the existing Kotlin/JS backend transforms IR into JavaScript? 🤔
thanks in advance 🙌Michael Paus
08/30/2025, 4:41 PMWillem Veelenturf
08/31/2025, 8:12 AMAndrey
09/01/2025, 7:05 AMstrip
functions with such lines it is very easy to restore and reverse the code.
Any ideas?Mohammad Fallah
09/01/2025, 2:15 PMBox
or similar. But this forces us to pass parameters down through three or four functions. The result is unnecessarily bloated function signatures. The real pain comes when you need to add a new parameter to the deepest composable — you end up modifying five or six functions just to thread that value all the way down.
My idea was to annotate the child’s parameter with @arg
. A class would then be generated for that function’s arguments, which you could reference in its parent. The class would act only as a marker and get replaced by the actual parameter at compile time. (I’ve attached an image to illustrate this.)
Unfortunately, I gave up on the implementation. The compiler plugin API is poorly documented, and the solution felt fragile — I worried it might easily break with the next Kotlin release. So, I decided to share the concept instead. Maybe someone in the community with deeper knowledge of compiler internals can pick it up and turn it into something stable. (it's not the whole solution and there are more that I'll share if someone is interested)theapache64
09/03/2025, 10:16 AMimplementation(project(":common"))
in gradle-plugin doesn’t seem to be working.. 🤔
am i missing something or doing it wrong…Zac Sweers
09/03/2025, 2:40 PMiosSimulatorArm64Main
are not visible in FIR during iosMain
compilation but are visible during IR. Is there a way to force compilation on a more specific set of inputs to see them in FIR? Or perhaps I'm misunderstanding how this part of the pipeline worksAlexander Ioffe
09/03/2025, 6:38 PMphldavies
09/03/2025, 10:15 PMcontext(@Receiver _: MyScope) fun doSomething() { callSomething() }
be translated to
context(_: MyScope) fun doSomething { with(contextOf<MyScope>()) { callSomething() } }
My gut says no but this would be a nice way of avoiding the need to create context parameter bridge functions.Willem Veelenturf
09/04/2025, 10:10 AMDrew Hamilton
09/04/2025, 3:38 PMjs.toLong
. (Stacktrace etc. in thread.) I haven’t seen an error like this before; is this an expected incompatibility?mbonnin
09/04/2025, 4:00 PMbuild-2.2.20-ij252-17
. Can I find this released somewhere so I have the same version in my plugin and IDE?mbonnin
09/04/2025, 4:03 PMsegunfamisa
09/06/2025, 12:10 PMkt
file/code, such that the rest of the content remains the same, and only specific mutations that I want to add get processed.
I want to update the code in-place, as a form of auto-correction, I would like this to happen using the Psi visitor.
I have tried using compiler embeddable & a PsiFactory to create an expression, and then call expression.replace()
. in my visit*()
function.
The code breaks in runtime with:
Missing extension point: org.jetbrains.kotlin.com.intellij.treeCopyHandler in container {}
I've seen comments about that error, and the seem to imply that the PSI tree is immutable, so I can't modify it (perhaps because I'm not in the IDE context).
My ideal case would be to run this piece of code, define the mutation I want to apply, and a target kotlin file, and it modifies the file in-place.
--
Is there any advise on how to approach this?Eugen Martynov
09/08/2025, 3:58 PMdata class Wrapper(
val data: String = "Test",
val intData: Int = 5
)
fun wrapper(copy: Wrapper.() -> Wrapper) {
Wrapper().copy(....)
}
val wrapper = wrapper { data = "Another" } // Constructs Wrapper("Another", 5)
madisp
09/11/2025, 8:16 AMVerifyError
at runtime after bumping to Kotlin 2.2.20. Happens with 2.2.10 as well, 2.2.0 is ok. 100% reproducible. The JVM error for this dumps bytecode, is there some other channel than Youtrack for reporting this? I'd be happy to share offending source / compiled bytecode privately.wasyl
09/12/2025, 1:31 AM"-Xwarning-level=<custom_warning>:error"
them? Specifically I'm trying to raise the `SUGGEST_CLASS_INJECTION` inspection level to error
but I get an e: Warning with name "SUGGEST_CLASS_INJECTION" does not exist
error, even if I only add the compiler warning when the plugin is applied:
plugins {
id 'dev.zacsweers.metro'
}
tasks.withType(KotlinCompile).configureEach {
compilerOptions.freeCompilerArgs.addAll(
"-Xwarning-level=SUGGEST_CLASS_INJECTION:error",
)
}
this happens for :compileKotlin
tasks in jvm modules. Is it an issue with the compiler plugin or Kotlin? Or my setup?Xavier F. Gouchet
09/12/2025, 6:45 AMcheck
method is marked as Deprecated, but I can't see any info on what is recommend to use instead. Is there an official suggestion to get the same effect in a FirAdditionalCheckersExtension
?Alexander Ioffe
09/16/2025, 4:54 AMPlatform declaration clash: The following declarations have the same JVM signature (xrSqlQueryModelTokenImpl$lambda$0$0(Lio/exoquery/SqliteDialect;Lio/exoquery/sql/SqlQueryModel;)Lio/exoquery/sql/Token;):
fun `xrSqlQueryModelTokenImpl$lambda$0$0`(`this$0`: SqliteDialect, `$this_with`: SqlQueryModel): Token defined in io.exoquery.SqliteDialect
fun `xrSqlQueryModelTokenImpl$lambda$0$0`(`this$0`: SqliteDialect, `$this_with`: SqlQueryModel): Token defined in io.exoquery.SqliteDialect
This goes away when in my buildFun
call I replace IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA
with IrDeclarationOrigin.LOCAL_FUNCTION
.
Have the lambda-naming rules changed in 2.2.20?François
09/16/2025, 6:44 PMtjohnn
09/17/2025, 10:43 PMKotlinCoreEnvironment
are now marked deprecated in the latest kotlin-compiler-embeddable
and are to be removed from version 2.3+, is it safe to assume the reworked alternative will be available in version 2.3 or we should look for some other alternatives 😄?