Report error on incompatible .kotlin_module files in classpath
Also remove obsolete test wrongAbiVersionNoErrors #KT-25973 Fixed #KT-26266 Open
This commit is contained in:
@@ -201,7 +201,9 @@ public class ClassFileFactory implements OutputFileCollection {
|
||||
case "kotlin_module": {
|
||||
ModuleMapping mapping = ModuleMappingUtilKt.loadModuleMapping(
|
||||
ModuleMapping.Companion, file.asByteArray(), relativePath.getPath(),
|
||||
CompilerDeserializationConfiguration.Default.INSTANCE
|
||||
CompilerDeserializationConfiguration.Default.INSTANCE, version -> {
|
||||
throw new IllegalStateException("Version of the generated module cannot be incompatible: " + version);
|
||||
}
|
||||
);
|
||||
for (Map.Entry<String, PackageParts> entry : mapping.getPackageFqName2Parts().entrySet()) {
|
||||
FqName packageFqName = new FqName(entry.getKey());
|
||||
|
||||
@@ -38,7 +38,9 @@ private fun Iterable<PackageParts>.addCompiledParts(state: GenerationState): Lis
|
||||
val incrementalCache = state.incrementalCacheForThisTarget ?: return this.toList()
|
||||
val moduleMappingData = incrementalCache.getModuleMappingData() ?: return this.toList()
|
||||
|
||||
val mapping = ModuleMapping.loadModuleMapping(moduleMappingData, "<incremental>", state.deserializationConfiguration)
|
||||
val mapping = ModuleMapping.loadModuleMapping(moduleMappingData, "<incremental>", state.deserializationConfiguration) { version ->
|
||||
throw IllegalStateException("Version of the generated module cannot be incompatible: $version")
|
||||
}
|
||||
|
||||
incrementalCache.getObsoletePackageParts().forEach { internalName ->
|
||||
val qualifier = JvmClassName.byInternalName(internalName).packageFqName.asString()
|
||||
|
||||
Reference in New Issue
Block a user