[JVM_IR] Don't use irPluginContext at all when compiling code fragment
This is an extended version of the fix in
57d912a5d4. We don't want to use any
plugins in code fragment compilation, but we still get them through
`project` because they are registered in IDEA. So we just fully
exclude `irPluginContext`.
#KT-63695 Fixed
This commit is contained in:
+3
-3
@@ -116,7 +116,7 @@ open class JvmIrCodegenFactory(
|
||||
val irProviders: List<IrProvider>,
|
||||
val extensions: JvmGeneratorExtensions,
|
||||
val backendExtension: JvmBackendExtension,
|
||||
val pluginContext: IrPluginContext,
|
||||
val pluginContext: IrPluginContext?,
|
||||
val notifyCodegenStart: () -> Unit
|
||||
) : CodegenFactory.BackendInput
|
||||
|
||||
@@ -212,8 +212,8 @@ open class JvmIrCodegenFactory(
|
||||
psi2irContext.irBuiltIns,
|
||||
irLinker,
|
||||
messageLogger
|
||||
)
|
||||
if (pluginExtensions.isNotEmpty() && !ideCodegenSettings.shouldStubAndNotLinkUnboundSymbols) {
|
||||
).takeIf { !ideCodegenSettings.shouldStubAndNotLinkUnboundSymbols }
|
||||
if (pluginExtensions.isNotEmpty() && pluginContext != null) {
|
||||
for (extension in pluginExtensions) {
|
||||
if (psi2irContext.configuration.generateBodies ||
|
||||
@OptIn(FirIncompatiblePluginAPI::class) extension.shouldAlsoBeAppliedInKaptStubGenerationMode
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ sealed class IrBackendInput : ResultingArtifact.BackendInput<IrBackendInput>() {
|
||||
get() = backendInput.irModuleFragment
|
||||
|
||||
override val irPluginContext: IrPluginContext
|
||||
get() = backendInput.pluginContext
|
||||
get() = backendInput.pluginContext!!
|
||||
|
||||
override val diagnosticReporter: BaseDiagnosticsCollector
|
||||
get() = state.diagnosticReporter as BaseDiagnosticsCollector
|
||||
|
||||
Reference in New Issue
Block a user