Kapt+JVM_IR: do not run IR plugins in kapt mode
Because in kapt stub generation mode (aka ClassBuilderMode.KAPT3, aka generateBodies=false in psi2ir), method bodies are not generated and compiler plugins such as kotlinx-serialization might not expect that. #KT-54245 Fixed
This commit is contained in:
committed by
Space Team
parent
5848b2fde6
commit
a594434a95
+1
-1
@@ -163,7 +163,7 @@ open class JvmIrCodegenFactory(
|
||||
|
||||
SourceDeclarationsPreprocessor(psi2irContext).run(input.files)
|
||||
|
||||
if (pluginExtensions.isNotEmpty()) {
|
||||
if (pluginExtensions.isNotEmpty() && psi2irContext.configuration.generateBodies) {
|
||||
// The plugin context contains unbound symbols right after construction and has to be
|
||||
// instantiated before we resolve unbound symbols and invoke any postprocessing steps.
|
||||
val pluginContext = IrPluginContextImpl(
|
||||
|
||||
Reference in New Issue
Block a user