Skip to content

Commit

Permalink
Remove workaround for KT-50889
Browse files Browse the repository at this point in the history
where descriptors cached in CommonDependenciesContainer was
initialized multiple times.
  • Loading branch information
ting-yuan committed Feb 8, 2022
1 parent 6340a83 commit 46f6085
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,10 @@ import org.jetbrains.kotlin.cli.jvm.plugins.ServiceLoaderLite
import org.jetbrains.kotlin.container.ComponentProvider
import org.jetbrains.kotlin.context.ProjectContext
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl
import org.jetbrains.kotlin.platform.isCommon
import org.jetbrains.kotlin.psi.KtFile
import org.jetbrains.kotlin.resolve.BindingContext
import org.jetbrains.kotlin.resolve.BindingTrace
import org.jetbrains.kotlin.resolve.extensions.AnalysisHandlerExtension
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
import java.io.File
import java.io.PrintWriter
import java.io.StringWriter
Expand Down Expand Up @@ -254,16 +251,6 @@ abstract class AbstractKotlinSymbolProcessingExtension(
else
AnalysisResult.success(BindingContext.EMPTY, module, shouldGenerateCode = false)
} else {
// Temporary workaround for metadata task class path issue.
if (module.platform.isCommon()) {
module.allDependencyModules.filter { it != module.builtIns.builtInsModule }.forEach {
it.safeAs<ModuleDescriptorImpl>()?.let {
val field = it.javaClass.getDeclaredField("packageFragmentProviderForModuleContent")
field.isAccessible = true
field.set(it, null)
}
}
}
AnalysisResult.RetryWithAdditionalRoots(
BindingContext.EMPTY,
module,
Expand Down

0 comments on commit 46f6085

Please sign in to comment.