Extract & use GenerationState.metadataVersion helper

This commit is contained in:
Mikhail Glukhikh
2022-12-02 13:22:13 +01:00
parent f332b6dcec
commit f6b8b3438a
4 changed files with 13 additions and 11 deletions
@@ -76,9 +76,7 @@ class Fir2IrJsResultsConverter(
val icData = configuration.incrementalDataProvider?.getSerializedData(sourceFiles) ?: emptyList()
val expectDescriptorToSymbol = mutableMapOf<DeclarationDescriptor, IrSymbol>()
val metadataVersion =
configuration.get(CommonConfigurationKeys.METADATA_VERSION)
?: GenerationState.LANGUAGE_TO_METADATA_VERSION.getValue(module.languageVersionSettings.languageVersion)
val metadataVersion = GenerationState.metadataVersion(configuration, module.languageVersionSettings)
// At this point, checkers will already have been run by a previous test step. `runCheckers` returns the cached diagnostics map.
val diagnosticsMap = inputArtifact.partsForDependsOnModules.last().firAnalyzerFacade.runCheckers()