neworldlt
04/19/2022, 3:55 PMinternal
modifiers in the compiler process. Like kotlin-allopen
plugin. The idea is to keep a way of having internal
abuse in kotlin generated code. However, after deep-diving I hit a wall. No extension is running because Square's Anvil
(and probably KSP) is generating code that does not compile due to publicly exposed internal
stuff. The only exception is DeclarationAttributeAltererExtension
, which runs during the resolve phase. However, DeclarationAttributeAltererExtension
is able to modify only Modality
.
Is there any other way to plugin during resolve
phase in order to fix compilation errors?shikasd
04/20/2022, 11:45 AMneworldlt
04/20/2022, 1:19 PMfir-plugin-prototype
, and even exactly the code I want to implement: https://github.com/JetBrains/kotlin/blob/master/plugins/fir-plugin-prototype/src/o[…]rains/kotlin/fir/plugin/FirPluginPrototypeExtensionRegistrar.kt
However, in my code FirExtensionRegistrar
is not running at all.neworldlt
04/20/2022, 1:29 PMshikasd
04/20/2022, 1:32 PMneworldlt
04/20/2022, 1:45 PMfreeCompilerArgs += "-Xuse-fir"
shikasd
04/20/2022, 1:45 PMneworldlt
04/20/2022, 1:48 PMshikasd
04/20/2022, 1:49 PMneworldlt
04/20/2022, 1:54 PMClass 'com.vinted.deinternalize.sample.lib.ExternalDep' is compiled by the new Kotlin compiler frontend and cannot be loaded by the old compiler
neworldlt
04/20/2022, 1:55 PMshikasd
04/20/2022, 1:55 PM