File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
java/kotlin-extractor/src/main/kotlin Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 44package com.github.codeql
55
66import com.intellij.mock.MockProject
7+ import com.intellij.openapi.extensions.LoadingOrder
78import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension
89import org.jetbrains.kotlin.config.CompilerConfiguration
910
@@ -16,14 +17,18 @@ class KotlinExtractorComponentRegistrar : Kotlin2ComponentRegistrar() {
1617 if (invocationTrapFile == null ) {
1718 throw Exception (" Required argument for TRAP invocation file not given" )
1819 }
19- IrGenerationExtension .registerExtension(
20- project,
20+ // Register with LoadingOrder.LAST to ensure the extractor runs after other
21+ // IR generation plugins (like kotlinx.serialization) have generated their code.
22+ val extensionPoint = project.extensionArea.getExtensionPoint(IrGenerationExtension .extensionPointName)
23+ extensionPoint.registerExtension(
2124 KotlinExtractorExtension (
2225 invocationTrapFile,
2326 configuration[KEY_CHECK_TRAP_IDENTICAL ] ? : false ,
2427 configuration[KEY_COMPILATION_STARTTIME ],
2528 configuration[KEY_EXIT_AFTER_EXTRACTION ] ? : false
26- )
29+ ),
30+ LoadingOrder .LAST ,
31+ project
2732 )
2833 }
2934}
You can’t perform that action at this time.
0 commit comments