From 6e9cd85b54b3da12844e0879956b89496e6b2ec3 Mon Sep 17 00:00:00 2001 From: Alexey Tsvetkov Date: Mon, 28 Oct 2019 07:51:45 +0300 Subject: [PATCH] Exclude some proto messages from proto comparison in IC --- .../incremental/ProtoCompareGenerated.kt | 74 ---- .../incremental/protoDifferenceUtils.kt | 4 - .../metadata/DebugKlibMetadataProtoBuf.java | 143 ++++--- .../metadata/DebugExtOptionsProtoBuf.java | 17 +- .../kotlin/metadata/DebugProtoBuf.java | 375 +++++++++--------- .../src/KlibMetadataProtoBuf.proto | 16 +- core/metadata/src/ext_options.proto | 4 + core/metadata/src/metadata.proto | 6 + .../protobuf/GenerateProtoBufCompare.kt | 20 +- 9 files changed, 304 insertions(+), 355 deletions(-) diff --git a/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt b/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt index 73bf9af5d3d..6312b1bbd5e 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt @@ -53,11 +53,6 @@ open class ProtoCompareGenerated( if (!checkEqualsPackageTypeAlias(old, new)) return false - if (old.hasTypeTable() != new.hasTypeTable()) return false - if (old.hasTypeTable()) { - if (!checkEquals(old.typeTable, new.typeTable)) return false - } - if (old.hasVersionRequirementTable() != new.hasVersionRequirementTable()) return false if (old.hasVersionRequirementTable()) { if (!checkEquals(old.versionRequirementTable, new.versionRequirementTable)) return false @@ -98,7 +93,6 @@ open class ProtoCompareGenerated( FUNCTION_LIST, PROPERTY_LIST, TYPE_ALIAS_LIST, - TYPE_TABLE, VERSION_REQUIREMENT_TABLE, JVM_EXT_PACKAGE_MODULE_NAME, JVM_EXT_PACKAGE_LOCAL_VARIABLE_LIST, @@ -116,11 +110,6 @@ open class ProtoCompareGenerated( if (!checkEqualsPackageTypeAlias(old, new)) result.add(ProtoBufPackageKind.TYPE_ALIAS_LIST) - if (old.hasTypeTable() != new.hasTypeTable()) result.add(ProtoBufPackageKind.TYPE_TABLE) - if (old.hasTypeTable()) { - if (!checkEquals(old.typeTable, new.typeTable)) result.add(ProtoBufPackageKind.TYPE_TABLE) - } - if (old.hasVersionRequirementTable() != new.hasVersionRequirementTable()) result.add(ProtoBufPackageKind.VERSION_REQUIREMENT_TABLE) if (old.hasVersionRequirementTable()) { if (!checkEquals(old.versionRequirementTable, new.versionRequirementTable)) result.add(ProtoBufPackageKind.VERSION_REQUIREMENT_TABLE) @@ -191,11 +180,6 @@ open class ProtoCompareGenerated( if (!checkEqualsClassSealedSubclassFqName(old, new)) return false - if (old.hasTypeTable() != new.hasTypeTable()) return false - if (old.hasTypeTable()) { - if (!checkEquals(old.typeTable, new.typeTable)) return false - } - if (!checkEqualsClassVersionRequirement(old, new)) return false if (old.hasVersionRequirementTable() != new.hasVersionRequirementTable()) return false @@ -275,7 +259,6 @@ open class ProtoCompareGenerated( TYPE_ALIAS_LIST, ENUM_ENTRY_LIST, SEALED_SUBCLASS_FQ_NAME_LIST, - TYPE_TABLE, VERSION_REQUIREMENT_LIST, VERSION_REQUIREMENT_TABLE, JVM_EXT_CLASS_MODULE_NAME, @@ -323,11 +306,6 @@ open class ProtoCompareGenerated( if (!checkEqualsClassSealedSubclassFqName(old, new)) result.add(ProtoBufClassKind.SEALED_SUBCLASS_FQ_NAME_LIST) - if (old.hasTypeTable() != new.hasTypeTable()) result.add(ProtoBufClassKind.TYPE_TABLE) - if (old.hasTypeTable()) { - if (!checkEquals(old.typeTable, new.typeTable)) result.add(ProtoBufClassKind.TYPE_TABLE) - } - if (!checkEqualsClassVersionRequirement(old, new)) result.add(ProtoBufClassKind.VERSION_REQUIREMENT_LIST) if (old.hasVersionRequirementTable() != new.hasVersionRequirementTable()) result.add(ProtoBufClassKind.VERSION_REQUIREMENT_TABLE) @@ -431,11 +409,6 @@ open class ProtoCompareGenerated( if (!checkEqualsFunctionValueParameter(old, new)) return false - if (old.hasTypeTable() != new.hasTypeTable()) return false - if (old.hasTypeTable()) { - if (!checkEquals(old.typeTable, new.typeTable)) return false - } - if (!checkEqualsFunctionVersionRequirement(old, new)) return false if (old.hasContract() != new.hasContract()) return false @@ -711,17 +684,6 @@ open class ProtoCompareGenerated( return true } - open fun checkEquals(old: ProtoBuf.TypeTable, new: ProtoBuf.TypeTable): Boolean { - if (!checkEqualsTypeTableType(old, new)) return false - - if (old.hasFirstNullable() != new.hasFirstNullable()) return false - if (old.hasFirstNullable()) { - if (old.firstNullable != new.firstNullable) return false - } - - return true - } - open fun checkEquals(old: ProtoBuf.VersionRequirementTable, new: ProtoBuf.VersionRequirementTable): Boolean { if (!checkEqualsVersionRequirementTableRequirement(old, new)) return false @@ -1504,16 +1466,6 @@ open class ProtoCompareGenerated( return true } - open fun checkEqualsTypeTableType(old: ProtoBuf.TypeTable, new: ProtoBuf.TypeTable): Boolean { - if (old.typeCount != new.typeCount) return false - - for(i in 0..old.typeCount - 1) { - if (!checkEquals(old.getType(i), new.getType(i))) return false - } - - return true - } - open fun checkEqualsVersionRequirementTableRequirement(old: ProtoBuf.VersionRequirementTable, new: ProtoBuf.VersionRequirementTable): Boolean { if (old.requirementCount != new.requirementCount) return false @@ -1683,10 +1635,6 @@ fun ProtoBuf.Package.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) hashCode = 31 * hashCode + getTypeAlias(i).hashCode(stringIndexes, fqNameIndexes, typeById) } - if (hasTypeTable()) { - hashCode = 31 * hashCode + typeTable.hashCode(stringIndexes, fqNameIndexes, typeById) - } - if (hasVersionRequirementTable()) { hashCode = 31 * hashCode + versionRequirementTable.hashCode(stringIndexes, fqNameIndexes, typeById) } @@ -1767,10 +1715,6 @@ fun ProtoBuf.Class.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> hashCode = 31 * hashCode + fqNameIndexes(getSealedSubclassFqName(i)) } - if (hasTypeTable()) { - hashCode = 31 * hashCode + typeTable.hashCode(stringIndexes, fqNameIndexes, typeById) - } - for(i in 0..versionRequirementCount - 1) { hashCode = 31 * hashCode + getVersionRequirement(i) } @@ -1851,10 +1795,6 @@ fun ProtoBuf.Function.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) hashCode = 31 * hashCode + getValueParameter(i).hashCode(stringIndexes, fqNameIndexes, typeById) } - if (hasTypeTable()) { - hashCode = 31 * hashCode + typeTable.hashCode(stringIndexes, fqNameIndexes, typeById) - } - for(i in 0..versionRequirementCount - 1) { hashCode = 31 * hashCode + getVersionRequirement(i) } @@ -2058,20 +1998,6 @@ fun ProtoBuf.TypeAlias.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int return hashCode } -fun ProtoBuf.TypeTable.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int, typeById: (Int) -> ProtoBuf.Type): Int { - var hashCode = 1 - - for(i in 0..typeCount - 1) { - hashCode = 31 * hashCode + getType(i).hashCode(stringIndexes, fqNameIndexes, typeById) - } - - if (hasFirstNullable()) { - hashCode = 31 * hashCode + firstNullable - } - - return hashCode -} - fun ProtoBuf.VersionRequirementTable.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int, typeById: (Int) -> ProtoBuf.Type): Int { var hashCode = 1 diff --git a/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt b/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt index d4b27622370..4df54345ff2 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt @@ -239,9 +239,6 @@ class DifferenceCalculatorForClass( // when (x as Base) { is Impl -> ... } areSubclassesAffected = true } - ProtoBufClassKind.TYPE_TABLE -> { - // TODO - } ProtoBufClassKind.VERSION_REQUIREMENT_LIST, ProtoBufClassKind.VERSION_REQUIREMENT_TABLE -> { // TODO @@ -317,7 +314,6 @@ class DifferenceCalculatorForPackageFacade( names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Package::getPropertyList)) ProtoBufPackageKind.TYPE_ALIAS_LIST -> names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Package::getTypeAliasList)) - ProtoBufPackageKind.TYPE_TABLE, ProtoBufPackageKind.VERSION_REQUIREMENT_TABLE, ProtoBufPackageKind.JVM_EXT_PACKAGE_MODULE_NAME, ProtoBufPackageKind.JS_EXT_PACKAGE_FQ_NAME -> { diff --git a/build-common/test/org/jetbrains/kotlin/library/metadata/DebugKlibMetadataProtoBuf.java b/build-common/test/org/jetbrains/kotlin/library/metadata/DebugKlibMetadataProtoBuf.java index f18d05c604a..f0e5f57f3b3 100644 --- a/build-common/test/org/jetbrains/kotlin/library/metadata/DebugKlibMetadataProtoBuf.java +++ b/build-common/test/org/jetbrains/kotlin/library/metadata/DebugKlibMetadataProtoBuf.java @@ -3473,79 +3473,78 @@ public final class DebugKlibMetadataProtoBuf { "ackage_fragment_name\030\007 \003(\t\022\025\n\rempty_pack" + "age\030\010 \003(\t\0229\n\004file\030\t \003(\0132+.org.jetbrains." + "kotlin.library.metadata.File\"\024\n\004File\022\014\n\004" + - "name\030\001 \002(\t\"!\n\020DescriptorUniqId\022\r\n\005index\030" + - "\001 \002(\003:@\n\017package_fq_name\022&.org.jetbrains" + - ".kotlin.metadata.Package\030\253\001 \001(\005:j\n\020class" + - "_annotation\022$.org.jetbrains.kotlin.metad" + - "ata.Class\030\252\001 \003(\0132).org.jetbrains.kotlin." + - "metadata.Annotation:?\n\nclass_file\022$.org.", - "jetbrains.kotlin.metadata.Class\030\257\001 \001(\005B\004" + - "\200\265\030\001:{\n\rclass_uniq_id\022$.org.jetbrains.ko" + - "tlin.metadata.Class\030\253\001 \001(\01327.org.jetbrai" + - "ns.kotlin.library.metadata.DescriptorUni" + - "qIdB\004\200\265\030\001:v\n\026constructor_annotation\022*.or" + + "name\030\001 \002(\t\"\'\n\020DescriptorUniqId\022\r\n\005index\030" + + "\001 \002(\003:\004\240\273\030\001:@\n\017package_fq_name\022&.org.jet" + + "brains.kotlin.metadata.Package\030\253\001 \001(\005:j\n" + + "\020class_annotation\022$.org.jetbrains.kotlin" + + ".metadata.Class\030\252\001 \003(\0132).org.jetbrains.k" + + "otlin.metadata.Annotation:?\n\nclass_file\022", + "$.org.jetbrains.kotlin.metadata.Class\030\257\001" + + " \001(\005B\004\200\265\030\001:u\n\rclass_uniq_id\022$.org.jetbra" + + "ins.kotlin.metadata.Class\030\253\001 \001(\01327.org.j" + + "etbrains.kotlin.library.metadata.Descrip" + + "torUniqId:v\n\026constructor_annotation\022*.or" + "g.jetbrains.kotlin.metadata.Constructor\030" + "\252\001 \003(\0132).org.jetbrains.kotlin.metadata.A" + - "nnotation:\207\001\n\023constructor_uniq_id\022*.org." + + "nnotation:\201\001\n\023constructor_uniq_id\022*.org." + "jetbrains.kotlin.metadata.Constructor\030\254\001" + " \001(\01327.org.jetbrains.kotlin.library.meta", - "data.DescriptorUniqIdB\004\200\265\030\001:p\n\023function_" + - "annotation\022\'.org.jetbrains.kotlin.metada" + - "ta.Function\030\252\001 \003(\0132).org.jetbrains.kotli" + - "n.metadata.Annotation:E\n\rfunction_file\022\'" + - ".org.jetbrains.kotlin.metadata.Function\030" + - "\254\001 \001(\005B\004\200\265\030\001:\201\001\n\020function_uniq_id\022\'.org." + - "jetbrains.kotlin.metadata.Function\030\255\001 \001(" + - "\01327.org.jetbrains.kotlin.library.metadat" + - "a.DescriptorUniqIdB\004\200\265\030\001:p\n\023property_ann" + - "otation\022\'.org.jetbrains.kotlin.metadata.", - "Property\030\252\001 \003(\0132).org.jetbrains.kotlin.m" + - "etadata.Annotation:w\n\032property_getter_an" + - "notation\022\'.org.jetbrains.kotlin.metadata" + - ".Property\030\261\001 \003(\0132).org.jetbrains.kotlin." + - "metadata.Annotation:w\n\032property_setter_a" + - "nnotation\022\'.org.jetbrains.kotlin.metadat" + - "a.Property\030\262\001 \003(\0132).org.jetbrains.kotlin" + - ".metadata.Annotation:~\n\022compile_time_val" + - "ue\022\'.org.jetbrains.kotlin.metadata.Prope" + - "rty\030\255\001 \001(\01328.org.jetbrains.kotlin.metada", - "ta.Annotation.Argument.Value:E\n\rproperty" + - "_file\022\'.org.jetbrains.kotlin.metadata.Pr" + - "operty\030\260\001 \001(\005B\004\200\265\030\001:\201\001\n\020property_uniq_id" + - "\022\'.org.jetbrains.kotlin.metadata.Propert" + - "y\030\263\001 \001(\01327.org.jetbrains.kotlin.library." + - "metadata.DescriptorUniqIdB\004\200\265\030\001:s\n\025enum_" + - "entry_annotation\022(.org.jetbrains.kotlin." + - "metadata.EnumEntry\030\252\001 \003(\0132).org.jetbrain" + - "s.kotlin.metadata.Annotation:E\n\022enum_ent" + - "ry_ordinal\022(.org.jetbrains.kotlin.metada", - "ta.EnumEntry\030\253\001 \001(\005:\204\001\n\022enum_entry_uniq_" + - "id\022(.org.jetbrains.kotlin.metadata.EnumE" + - "ntry\030\254\001 \001(\01327.org.jetbrains.kotlin.libra" + - "ry.metadata.DescriptorUniqIdB\004\200\265\030\001:w\n\024pa" + - "rameter_annotation\022-.org.jetbrains.kotli" + - "n.metadata.ValueParameter\030\252\001 \003(\0132).org.j" + - "etbrains.kotlin.metadata.Annotation:h\n\017t" + - "ype_annotation\022#.org.jetbrains.kotlin.me" + - "tadata.Type\030\252\001 \003(\0132).org.jetbrains.kotli" + - "n.metadata.Annotation:{\n\031type_parameter_", - "annotation\022,.org.jetbrains.kotlin.metada" + - "ta.TypeParameter\030\252\001 \003(\0132).org.jetbrains." + - "kotlin.metadata.Annotation:\210\001\n\022type_para" + - "m_uniq_id\022,.org.jetbrains.kotlin.metadat" + - "a.TypeParameter\030\253\001 \001(\01327.org.jetbrains.k" + - "otlin.library.metadata.DescriptorUniqIdB" + - "\004\200\265\030\001:U\n\026package_fragment_files\022..org.je" + + "data.DescriptorUniqId:p\n\023function_annota" + + "tion\022\'.org.jetbrains.kotlin.metadata.Fun" + + "ction\030\252\001 \003(\0132).org.jetbrains.kotlin.meta" + + "data.Annotation:E\n\rfunction_file\022\'.org.j" + + "etbrains.kotlin.metadata.Function\030\254\001 \001(\005" + + "B\004\200\265\030\001:{\n\020function_uniq_id\022\'.org.jetbrai" + + "ns.kotlin.metadata.Function\030\255\001 \001(\01327.org" + + ".jetbrains.kotlin.library.metadata.Descr" + + "iptorUniqId:p\n\023property_annotation\022\'.org" + + ".jetbrains.kotlin.metadata.Property\030\252\001 \003", + "(\0132).org.jetbrains.kotlin.metadata.Annot" + + "ation:w\n\032property_getter_annotation\022\'.or" + + "g.jetbrains.kotlin.metadata.Property\030\261\001 " + + "\003(\0132).org.jetbrains.kotlin.metadata.Anno" + + "tation:w\n\032property_setter_annotation\022\'.o" + + "rg.jetbrains.kotlin.metadata.Property\030\262\001" + + " \003(\0132).org.jetbrains.kotlin.metadata.Ann" + + "otation:~\n\022compile_time_value\022\'.org.jetb" + + "rains.kotlin.metadata.Property\030\255\001 \001(\01328." + + "org.jetbrains.kotlin.metadata.Annotation", + ".Argument.Value:E\n\rproperty_file\022\'.org.j" + + "etbrains.kotlin.metadata.Property\030\260\001 \001(\005" + + "B\004\200\265\030\001:{\n\020property_uniq_id\022\'.org.jetbrai" + + "ns.kotlin.metadata.Property\030\263\001 \001(\01327.org" + + ".jetbrains.kotlin.library.metadata.Descr" + + "iptorUniqId:s\n\025enum_entry_annotation\022(.o" + + "rg.jetbrains.kotlin.metadata.EnumEntry\030\252" + + "\001 \003(\0132).org.jetbrains.kotlin.metadata.An" + + "notation:E\n\022enum_entry_ordinal\022(.org.jet" + + "brains.kotlin.metadata.EnumEntry\030\253\001 \001(\005:", + "~\n\022enum_entry_uniq_id\022(.org.jetbrains.ko" + + "tlin.metadata.EnumEntry\030\254\001 \001(\01327.org.jet" + + "brains.kotlin.library.metadata.Descripto" + + "rUniqId:w\n\024parameter_annotation\022-.org.je" + + "tbrains.kotlin.metadata.ValueParameter\030\252" + + "\001 \003(\0132).org.jetbrains.kotlin.metadata.An" + + "notation:h\n\017type_annotation\022#.org.jetbra" + + "ins.kotlin.metadata.Type\030\252\001 \003(\0132).org.je" + + "tbrains.kotlin.metadata.Annotation:{\n\031ty" + + "pe_parameter_annotation\022,.org.jetbrains.", + "kotlin.metadata.TypeParameter\030\252\001 \003(\0132).o" + + "rg.jetbrains.kotlin.metadata.Annotation:" + + "\202\001\n\022type_param_uniq_id\022,.org.jetbrains.k" + + "otlin.metadata.TypeParameter\030\253\001 \001(\01327.or" + + "g.jetbrains.kotlin.library.metadata.Desc" + + "riptorUniqId:U\n\026package_fragment_files\022." + + ".org.jetbrains.kotlin.metadata.PackageFr" + + "agment\030\252\001 \003(\005B\004\200\265\030\001:A\n\010is_empty\022..org.je" + "tbrains.kotlin.metadata.PackageFragment\030" + - "\252\001 \003(\005B\004\200\265\030\001:A\n\010is_empty\022..org.jetbrains" + - ".kotlin.metadata.PackageFragment\030\254\001 \001(\010:", - "@\n\007fq_name\022..org.jetbrains.kotlin.metada" + - "ta.PackageFragment\030\255\001 \001(\t:G\n\nclass_name\022" + - "..org.jetbrains.kotlin.metadata.PackageF" + - "ragment\030\256\001 \003(\005B\002\020\001:\204\001\n\022type_alias_uniq_i" + - "d\022(.org.jetbrains.kotlin.metadata.TypeAl" + - "ias\030\203\001 \001(\01327.org.jetbrains.kotlin.librar" + - "y.metadata.DescriptorUniqIdB\004\200\265\030\001B\033B\031Deb" + + "\254\001 \001(\010:@\n\007fq_name\022..org.jetbrains.kotlin", + ".metadata.PackageFragment\030\255\001 \001(\t:G\n\nclas" + + "s_name\022..org.jetbrains.kotlin.metadata.P" + + "ackageFragment\030\256\001 \003(\005B\002\020\001:~\n\022type_alias_" + + "uniq_id\022(.org.jetbrains.kotlin.metadata." + + "TypeAlias\030\203\001 \001(\01327.org.jetbrains.kotlin." + + "library.metadata.DescriptorUniqIdB\033B\031Deb" + "ugKlibMetadataProtoBuf" }; org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = @@ -3609,13 +3608,7 @@ public final class DebugKlibMetadataProtoBuf { typeAliasUniqId.internalInit(descriptor.getExtensions().get(26)); org.jetbrains.kotlin.protobuf.ExtensionRegistry registry = org.jetbrains.kotlin.protobuf.ExtensionRegistry.newInstance(); - registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipInComparison); - registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipInComparison); - registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipInComparison); - registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipInComparison); - registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipInComparison); - registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipInComparison); - registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipInComparison); + registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipMessageInComparison); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipInComparison); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipInComparison); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipInComparison); diff --git a/build-common/test/org/jetbrains/kotlin/metadata/DebugExtOptionsProtoBuf.java b/build-common/test/org/jetbrains/kotlin/metadata/DebugExtOptionsProtoBuf.java index 7053af7a5d7..6e031b382bb 100644 --- a/build-common/test/org/jetbrains/kotlin/metadata/DebugExtOptionsProtoBuf.java +++ b/build-common/test/org/jetbrains/kotlin/metadata/DebugExtOptionsProtoBuf.java @@ -12,6 +12,7 @@ public final class DebugExtOptionsProtoBuf { registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.fqNameIdInTable); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.stringIdInTable); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.typeIdInTable); + registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipMessageInComparison); } public static final int SKIP_IN_COMPARISON_FIELD_NUMBER = 50000; /** @@ -68,6 +69,17 @@ public final class DebugExtOptionsProtoBuf { .newFileScopedGeneratedExtension( java.lang.Boolean.class, null); + public static final int SKIP_MESSAGE_IN_COMPARISON_FIELD_NUMBER = 50100; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + org.jetbrains.kotlin.protobuf.GeneratedMessage.GeneratedExtension< + org.jetbrains.kotlin.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> skipMessageInComparison = org.jetbrains.kotlin.protobuf.GeneratedMessage + .newFileScopedGeneratedExtension( + java.lang.Boolean.class, + null); public static org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -87,7 +99,9 @@ public final class DebugExtOptionsProtoBuf { "ns\030\322\206\003 \001(\010:;\n\022string_id_in_table\022\035.googl" + "e.protobuf.FieldOptions\030\323\206\003 \001(\010:9\n\020type_" + "id_in_table\022\035.google.protobuf.FieldOptio", - "ns\030\324\206\003 \001(\010B\031B\027DebugExtOptionsProtoBuf" + "ns\030\324\206\003 \001(\010:E\n\032skip_message_in_comparison" + + "\022\037.google.protobuf.MessageOptions\030\264\207\003 \001(" + + "\010B\031B\027DebugExtOptionsProtoBuf" }; org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -107,6 +121,7 @@ public final class DebugExtOptionsProtoBuf { fqNameIdInTable.internalInit(descriptor.getExtensions().get(2)); stringIdInTable.internalInit(descriptor.getExtensions().get(3)); typeIdInTable.internalInit(descriptor.getExtensions().get(4)); + skipMessageInComparison.internalInit(descriptor.getExtensions().get(5)); org.jetbrains.kotlin.protobuf.DescriptorProtos.getDescriptor(); } diff --git a/build-common/test/org/jetbrains/kotlin/metadata/DebugProtoBuf.java b/build-common/test/org/jetbrains/kotlin/metadata/DebugProtoBuf.java index 1ce356c1108..e3d0de92bd6 100644 --- a/build-common/test/org/jetbrains/kotlin/metadata/DebugProtoBuf.java +++ b/build-common/test/org/jetbrains/kotlin/metadata/DebugProtoBuf.java @@ -34302,194 +34302,194 @@ public final class DebugProtoBuf { java.lang.String[] descriptorData = { "\n&core/metadata/src/metadata.debug.proto" + "\022\035org.jetbrains.kotlin.metadata\032)core/me" + - "tadata/src/ext_options.debug.proto\"\035\n\013St" + - "ringTable\022\016\n\006string\030\001 \003(\t\"\276\002\n\022QualifiedN" + - "ameTable\022W\n\016qualified_name\030\001 \003(\0132?.org.j" + - "etbrains.kotlin.metadata.QualifiedNameTa" + - "ble.QualifiedName\032\316\001\n\rQualifiedName\022!\n\025p" + - "arent_qualified_name\030\001 \001(\005:\002-1\022\022\n\nshort_" + - "name\030\002 \002(\005\022[\n\004kind\030\003 \001(\0162D.org.jetbrains" + - ".kotlin.metadata.QualifiedNameTable.Qual", - "ifiedName.Kind:\007PACKAGE\")\n\004Kind\022\t\n\005CLASS" + - "\020\000\022\013\n\007PACKAGE\020\001\022\t\n\005LOCAL\020\002\"\226\006\n\nAnnotatio" + - "n\022\020\n\002id\030\001 \002(\005B\004\220\265\030\001\022D\n\010argument\030\002 \003(\01322." + - "org.jetbrains.kotlin.metadata.Annotation" + - ".Argument\032\257\005\n\010Argument\022\025\n\007name_id\030\001 \002(\005B" + - "\004\210\265\030\001\022G\n\005value\030\002 \002(\01328.org.jetbrains.kot" + - "lin.metadata.Annotation.Argument.Value\032\302" + - "\004\n\005Value\022K\n\004type\030\001 \001(\0162=.org.jetbrains.k" + - "otlin.metadata.Annotation.Argument.Value" + - ".Type\022\021\n\tint_value\030\002 \001(\022\022\023\n\013float_value\030", - "\003 \001(\002\022\024\n\014double_value\030\004 \001(\001\022\032\n\014string_va" + - "lue\030\005 \001(\005B\004\230\265\030\001\022\026\n\010class_id\030\006 \001(\005B\004\220\265\030\001\022" + - "\033\n\renum_value_id\030\007 \001(\005B\004\210\265\030\001\022=\n\nannotati" + - "on\030\010 \001(\0132).org.jetbrains.kotlin.metadata" + - ".Annotation\022O\n\rarray_element\030\t \003(\01328.org" + + "tadata/src/ext_options.debug.proto\"#\n\013St" + + "ringTable\022\016\n\006string\030\001 \003(\t:\004\240\273\030\001\"\304\002\n\022Qual" + + "ifiedNameTable\022W\n\016qualified_name\030\001 \003(\0132?" + + ".org.jetbrains.kotlin.metadata.Qualified" + + "NameTable.QualifiedName\032\316\001\n\rQualifiedNam" + + "e\022!\n\025parent_qualified_name\030\001 \001(\005:\002-1\022\022\n\n" + + "short_name\030\002 \002(\005\022[\n\004kind\030\003 \001(\0162D.org.jet" + + "brains.kotlin.metadata.QualifiedNameTabl", + "e.QualifiedName.Kind:\007PACKAGE\")\n\004Kind\022\t\n" + + "\005CLASS\020\000\022\013\n\007PACKAGE\020\001\022\t\n\005LOCAL\020\002:\004\240\273\030\001\"\226" + + "\006\n\nAnnotation\022\020\n\002id\030\001 \002(\005B\004\220\265\030\001\022D\n\010argum" + + "ent\030\002 \003(\01322.org.jetbrains.kotlin.metadat" + + "a.Annotation.Argument\032\257\005\n\010Argument\022\025\n\007na" + + "me_id\030\001 \002(\005B\004\210\265\030\001\022G\n\005value\030\002 \002(\01328.org.j" + + "etbrains.kotlin.metadata.Annotation.Argu" + + "ment.Value\032\302\004\n\005Value\022K\n\004type\030\001 \001(\0162=.org" + ".jetbrains.kotlin.metadata.Annotation.Ar" + - "gument.Value\022 \n\025array_dimension_count\030\013 " + - "\001(\005:\0010\022\020\n\005flags\030\n \001(\005:\0010\"\230\001\n\004Type\022\010\n\004BYT" + - "E\020\000\022\010\n\004CHAR\020\001\022\t\n\005SHORT\020\002\022\007\n\003INT\020\003\022\010\n\004LON" + - "G\020\004\022\t\n\005FLOAT\020\005\022\n\n\006DOUBLE\020\006\022\013\n\007BOOLEAN\020\007\022", - "\n\n\006STRING\020\010\022\t\n\005CLASS\020\t\022\010\n\004ENUM\020\n\022\016\n\nANNO" + - "TATION\020\013\022\t\n\005ARRAY\020\014\"\223\006\n\004Type\022>\n\010argument" + - "\030\002 \003(\0132,.org.jetbrains.kotlin.metadata.T" + - "ype.Argument\022\027\n\010nullable\030\003 \001(\010:\005false\022+\n" + - "\035flexible_type_capabilities_id\030\004 \001(\005B\004\230\265" + - "\030\001\022A\n\024flexible_upper_bound\030\005 \001(\0132#.org.j" + - "etbrains.kotlin.metadata.Type\022%\n\027flexibl" + - "e_upper_bound_id\030\010 \001(\005B\004\240\265\030\001\022\030\n\nclass_na" + - "me\030\006 \001(\005B\004\220\265\030\001\022\026\n\016type_parameter\030\007 \001(\005\022!" + - "\n\023type_parameter_name\030\t \001(\005B\004\210\265\030\001\022\035\n\017typ", - "e_alias_name\030\014 \001(\005B\004\220\265\030\001\0227\n\nouter_type\030\n" + + "gument.Value.Type\022\021\n\tint_value\030\002 \001(\022\022\023\n\013", + "float_value\030\003 \001(\002\022\024\n\014double_value\030\004 \001(\001\022" + + "\032\n\014string_value\030\005 \001(\005B\004\230\265\030\001\022\026\n\010class_id\030" + + "\006 \001(\005B\004\220\265\030\001\022\033\n\renum_value_id\030\007 \001(\005B\004\210\265\030\001" + + "\022=\n\nannotation\030\010 \001(\0132).org.jetbrains.kot" + + "lin.metadata.Annotation\022O\n\rarray_element" + + "\030\t \003(\01328.org.jetbrains.kotlin.metadata.A" + + "nnotation.Argument.Value\022 \n\025array_dimens" + + "ion_count\030\013 \001(\005:\0010\022\020\n\005flags\030\n \001(\005:\0010\"\230\001\n" + + "\004Type\022\010\n\004BYTE\020\000\022\010\n\004CHAR\020\001\022\t\n\005SHORT\020\002\022\007\n\003" + + "INT\020\003\022\010\n\004LONG\020\004\022\t\n\005FLOAT\020\005\022\n\n\006DOUBLE\020\006\022\013", + "\n\007BOOLEAN\020\007\022\n\n\006STRING\020\010\022\t\n\005CLASS\020\t\022\010\n\004EN" + + "UM\020\n\022\016\n\nANNOTATION\020\013\022\t\n\005ARRAY\020\014\"\223\006\n\004Type" + + "\022>\n\010argument\030\002 \003(\0132,.org.jetbrains.kotli" + + "n.metadata.Type.Argument\022\027\n\010nullable\030\003 \001" + + "(\010:\005false\022+\n\035flexible_type_capabilities_" + + "id\030\004 \001(\005B\004\230\265\030\001\022A\n\024flexible_upper_bound\030\005" + " \001(\0132#.org.jetbrains.kotlin.metadata.Typ" + - "e\022\033\n\router_type_id\030\013 \001(\005B\004\240\265\030\001\022=\n\020abbrev" + - "iated_type\030\r \001(\0132#.org.jetbrains.kotlin." + - "metadata.Type\022!\n\023abbreviated_type_id\030\016 \001" + - "(\005B\004\240\265\030\001\022\r\n\005flags\030\001 \001(\005\032\330\001\n\010Argument\022P\n\n" + - "projection\030\001 \001(\01627.org.jetbrains.kotlin." + - "metadata.Type.Argument.Projection:\003INV\0221" + - "\n\004type\030\002 \001(\0132#.org.jetbrains.kotlin.meta" + - "data.Type\022\025\n\007type_id\030\003 \001(\005B\004\240\265\030\001\"0\n\nProj", - "ection\022\006\n\002IN\020\000\022\007\n\003OUT\020\001\022\007\n\003INV\020\002\022\010\n\004STAR" + - "\020\003*\005\010d\020\310\001\"\234\002\n\rTypeParameter\022\n\n\002id\030\001 \002(\005\022" + - "\022\n\004name\030\002 \002(\005B\004\210\265\030\001\022\026\n\007reified\030\003 \001(\010:\005fa" + - "lse\022L\n\010variance\030\004 \001(\01625.org.jetbrains.ko" + - "tlin.metadata.TypeParameter.Variance:\003IN" + - "V\0228\n\013upper_bound\030\005 \003(\0132#.org.jetbrains.k" + - "otlin.metadata.Type\022\036\n\016upper_bound_id\030\006 " + - "\003(\005B\006\020\001\240\265\030\001\"$\n\010Variance\022\006\n\002IN\020\000\022\007\n\003OUT\020\001" + - "\022\007\n\003INV\020\002*\005\010d\020\350\007\"\250\007\n\005Class\022\020\n\005flags\030\001 \001(" + - "\005:\0016\022\025\n\007fq_name\030\003 \002(\005B\004\220\265\030\001\022#\n\025companion", - "_object_name\030\004 \001(\005B\004\210\265\030\001\022D\n\016type_paramet" + - "er\030\005 \003(\0132,.org.jetbrains.kotlin.metadata" + - ".TypeParameter\0226\n\tsupertype\030\006 \003(\0132#.org." + - "jetbrains.kotlin.metadata.Type\022\034\n\014supert" + - "ype_id\030\002 \003(\005B\006\020\001\240\265\030\001\022!\n\021nested_class_nam" + - "e\030\007 \003(\005B\006\020\001\210\265\030\001\022?\n\013constructor\030\010 \003(\0132*.o" + - "rg.jetbrains.kotlin.metadata.Constructor" + - "\0229\n\010function\030\t \003(\0132\'.org.jetbrains.kotli" + - "n.metadata.Function\0229\n\010property\030\n \003(\0132\'." + - "org.jetbrains.kotlin.metadata.Property\022<", - "\n\ntype_alias\030\013 \003(\0132(.org.jetbrains.kotli" + - "n.metadata.TypeAlias\022<\n\nenum_entry\030\r \003(\013" + - "2(.org.jetbrains.kotlin.metadata.EnumEnt" + - "ry\022\'\n\027sealed_subclass_fq_name\030\020 \003(\005B\006\020\001\220" + - "\265\030\001\022<\n\ntype_table\030\036 \001(\0132(.org.jetbrains." + - "kotlin.metadata.TypeTable\022\033\n\023version_req" + - "uirement\030\037 \003(\005\022Y\n\031version_requirement_ta" + - "ble\030 \001(\01326.org.jetbrains.kotlin.metadat" + - "a.VersionRequirementTable\"x\n\004Kind\022\t\n\005CLA" + - "SS\020\000\022\r\n\tINTERFACE\020\001\022\016\n\nENUM_CLASS\020\002\022\016\n\nE", - "NUM_ENTRY\020\003\022\024\n\020ANNOTATION_CLASS\020\004\022\n\n\006OBJ" + - "ECT\020\005\022\024\n\020COMPANION_OBJECT\020\006*\006\010d\020\270\224\001\"\335\002\n\007" + - "Package\0229\n\010function\030\003 \003(\0132\'.org.jetbrain" + - "s.kotlin.metadata.Function\0229\n\010property\030\004" + - " \003(\0132\'.org.jetbrains.kotlin.metadata.Pro" + - "perty\022<\n\ntype_alias\030\005 \003(\0132(.org.jetbrain" + - "s.kotlin.metadata.TypeAlias\022<\n\ntype_tabl" + - "e\030\036 \001(\0132(.org.jetbrains.kotlin.metadata." + - "TypeTable\022Y\n\031version_requirement_table\030 " + - " \001(\01326.org.jetbrains.kotlin.metadata.Ver", - "sionRequirementTable*\005\010d\020\310\001\"Z\n\tTypeTable" + - "\0221\n\004type\030\001 \003(\0132#.org.jetbrains.kotlin.me" + - "tadata.Type\022\032\n\016first_nullable\030\002 \001(\005:\002-1\"" + - "\214\001\n\013Constructor\022\020\n\005flags\030\001 \001(\005:\0016\022F\n\017val" + - "ue_parameter\030\002 \003(\0132-.org.jetbrains.kotli" + - "n.metadata.ValueParameter\022\033\n\023version_req" + - "uirement\030\037 \003(\005*\006\010d\020\270\224\001\"\246\004\n\010Function\022\020\n\005f" + - "lags\030\t \001(\005:\0016\022\024\n\told_flags\030\001 \001(\005:\0016\022\022\n\004n" + - "ame\030\002 \002(\005B\004\210\265\030\001\0228\n\013return_type\030\003 \001(\0132#.o" + - "rg.jetbrains.kotlin.metadata.Type\022\034\n\016ret", - "urn_type_id\030\007 \001(\005B\004\240\265\030\001\022D\n\016type_paramete" + - "r\030\004 \003(\0132,.org.jetbrains.kotlin.metadata." + - "TypeParameter\022:\n\rreceiver_type\030\005 \001(\0132#.o" + - "rg.jetbrains.kotlin.metadata.Type\022\036\n\020rec" + - "eiver_type_id\030\010 \001(\005B\004\240\265\030\001\022F\n\017value_param" + - "eter\030\006 \003(\0132-.org.jetbrains.kotlin.metada" + - "ta.ValueParameter\022<\n\ntype_table\030\036 \001(\0132(." + - "org.jetbrains.kotlin.metadata.TypeTable\022" + - "\033\n\023version_requirement\030\037 \003(\005\0229\n\010contract" + - "\030 \001(\0132\'.org.jetbrains.kotlin.metadata.C", - "ontract*\006\010d\020\270\224\001\"\345\003\n\010Property\022\022\n\005flags\030\013 " + - "\001(\005:\003518\022\027\n\told_flags\030\001 \001(\005:\0042054\022\022\n\004nam" + - "e\030\002 \002(\005B\004\210\265\030\001\0228\n\013return_type\030\003 \001(\0132#.org" + - ".jetbrains.kotlin.metadata.Type\022\034\n\016retur" + - "n_type_id\030\t \001(\005B\004\240\265\030\001\022D\n\016type_parameter\030" + - "\004 \003(\0132,.org.jetbrains.kotlin.metadata.Ty" + - "peParameter\022:\n\rreceiver_type\030\005 \001(\0132#.org" + - ".jetbrains.kotlin.metadata.Type\022\036\n\020recei" + - "ver_type_id\030\n \001(\005B\004\240\265\030\001\022M\n\026setter_value_" + - "parameter\030\006 \001(\0132-.org.jetbrains.kotlin.m", - "etadata.ValueParameter\022\024\n\014getter_flags\030\007" + - " \001(\005\022\024\n\014setter_flags\030\010 \001(\005\022\033\n\023version_re" + - "quirement\030\037 \003(\005*\006\010d\020\270\224\001\"\357\001\n\016ValueParamet" + - "er\022\020\n\005flags\030\001 \001(\005:\0010\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001" + - "\0221\n\004type\030\003 \001(\0132#.org.jetbrains.kotlin.me" + - "tadata.Type\022\025\n\007type_id\030\005 \001(\005B\004\240\265\030\001\022@\n\023va" + - "rarg_element_type\030\004 \001(\0132#.org.jetbrains." + - "kotlin.metadata.Type\022$\n\026vararg_element_t" + - "ype_id\030\006 \001(\005B\004\240\265\030\001*\005\010d\020\310\001\"\226\003\n\tTypeAlias\022" + - "\020\n\005flags\030\001 \001(\005:\0016\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\022D\n", - "\016type_parameter\030\003 \003(\0132,.org.jetbrains.ko" + - "tlin.metadata.TypeParameter\022<\n\017underlyin" + - "g_type\030\004 \001(\0132#.org.jetbrains.kotlin.meta" + - "data.Type\022 \n\022underlying_type_id\030\005 \001(\005B\004\240" + - "\265\030\001\022:\n\rexpanded_type\030\006 \001(\0132#.org.jetbrai" + - "ns.kotlin.metadata.Type\022\036\n\020expanded_type" + - "_id\030\007 \001(\005B\004\240\265\030\001\022=\n\nannotation\030\010 \003(\0132).or" + - "g.jetbrains.kotlin.metadata.Annotation\022\033" + - "\n\023version_requirement\030\037 \003(\005*\005\010d\020\310\001\"&\n\tEn" + - "umEntry\022\022\n\004name\030\001 \001(\005B\004\210\265\030\001*\005\010d\020\310\001\"\225\003\n\022V", - "ersionRequirement\022\017\n\007version\030\001 \001(\005\022\024\n\014ve" + - "rsion_full\030\002 \001(\005\022M\n\005level\030\003 \001(\01627.org.je" + - "tbrains.kotlin.metadata.VersionRequireme" + - "nt.Level:\005ERROR\022\022\n\nerror_code\030\004 \001(\005\022\025\n\007m" + - "essage\030\005 \001(\005B\004\230\265\030\001\022e\n\014version_kind\030\006 \001(\016" + - "2=.org.jetbrains.kotlin.metadata.Version" + - "Requirement.VersionKind:\020LANGUAGE_VERSIO" + - "N\"+\n\005Level\022\013\n\007WARNING\020\000\022\t\n\005ERROR\020\001\022\n\n\006HI" + - "DDEN\020\002\"J\n\013VersionKind\022\024\n\020LANGUAGE_VERSIO" + - "N\020\000\022\024\n\020COMPILER_VERSION\020\001\022\017\n\013API_VERSION", - "\020\002\"a\n\027VersionRequirementTable\022F\n\013require" + - "ment\030\001 \003(\01321.org.jetbrains.kotlin.metada" + - "ta.VersionRequirement\"\217\002\n\017PackageFragmen" + - "t\022;\n\007strings\030\001 \001(\0132*.org.jetbrains.kotli" + - "n.metadata.StringTable\022J\n\017qualified_name" + - "s\030\002 \001(\01321.org.jetbrains.kotlin.metadata." + - "QualifiedNameTable\0227\n\007package\030\003 \001(\0132&.or" + - "g.jetbrains.kotlin.metadata.Package\0223\n\005c" + - "lass\030\004 \003(\0132$.org.jetbrains.kotlin.metada" + - "ta.Class*\005\010d\020\310\001\"A\n\010Contract\0225\n\006effect\030\001 ", - "\003(\0132%.org.jetbrains.kotlin.metadata.Effe" + - "ct\"\306\003\n\006Effect\022E\n\013effect_type\030\001 \001(\01620.org" + - ".jetbrains.kotlin.metadata.Effect.Effect" + - "Type\022N\n\033effect_constructor_argument\030\002 \003(" + - "\0132).org.jetbrains.kotlin.metadata.Expres" + - "sion\022S\n conclusion_of_conditional_effect" + - "\030\003 \001(\0132).org.jetbrains.kotlin.metadata.E" + - "xpression\022B\n\004kind\030\004 \001(\01624.org.jetbrains." + - "kotlin.metadata.Effect.InvocationKind\"C\n" + - "\nEffectType\022\024\n\020RETURNS_CONSTANT\020\000\022\t\n\005CAL", - "LS\020\001\022\024\n\020RETURNS_NOT_NULL\020\002\"G\n\016Invocation" + - "Kind\022\020\n\014AT_MOST_ONCE\020\000\022\020\n\014EXACTLY_ONCE\020\001" + - "\022\021\n\rAT_LEAST_ONCE\020\002\"\245\003\n\nExpression\022\020\n\005fl" + - "ags\030\001 \001(\005:\0010\022!\n\031value_parameter_referenc" + - "e\030\002 \001(\005\022O\n\016constant_value\030\003 \001(\01627.org.je" + - "tbrains.kotlin.metadata.Expression.Const" + - "antValue\022=\n\020is_instance_type\030\004 \001(\0132#.org" + - ".jetbrains.kotlin.metadata.Type\022!\n\023is_in" + - "stance_type_id\030\005 \001(\005B\004\240\265\030\001\022?\n\014and_argume" + - "nt\030\006 \003(\0132).org.jetbrains.kotlin.metadata", - ".Expression\022>\n\013or_argument\030\007 \003(\0132).org.j" + - "etbrains.kotlin.metadata.Expression\".\n\rC" + - "onstantValue\022\010\n\004TRUE\020\000\022\t\n\005FALSE\020\001\022\010\n\004NUL" + - "L\020\002*9\n\010Modality\022\t\n\005FINAL\020\000\022\010\n\004OPEN\020\001\022\014\n\010" + - "ABSTRACT\020\002\022\n\n\006SEALED\020\003*b\n\nVisibility\022\014\n\010" + - "INTERNAL\020\000\022\013\n\007PRIVATE\020\001\022\r\n\tPROTECTED\020\002\022\n" + - "\n\006PUBLIC\020\003\022\023\n\017PRIVATE_TO_THIS\020\004\022\t\n\005LOCAL" + - "\020\005*Q\n\nMemberKind\022\017\n\013DECLARATION\020\000\022\021\n\rFAK" + - "E_OVERRIDE\020\001\022\016\n\nDELEGATION\020\002\022\017\n\013SYNTHESI" + - "ZED\020\003B\017B\rDebugProtoBuf" + "e\022%\n\027flexible_upper_bound_id\030\010 \001(\005B\004\240\265\030\001" + + "\022\030\n\nclass_name\030\006 \001(\005B\004\220\265\030\001\022\026\n\016type_param" + + "eter\030\007 \001(\005\022!\n\023type_parameter_name\030\t \001(\005B", + "\004\210\265\030\001\022\035\n\017type_alias_name\030\014 \001(\005B\004\220\265\030\001\0227\n\n" + + "outer_type\030\n \001(\0132#.org.jetbrains.kotlin." + + "metadata.Type\022\033\n\router_type_id\030\013 \001(\005B\004\240\265" + + "\030\001\022=\n\020abbreviated_type\030\r \001(\0132#.org.jetbr" + + "ains.kotlin.metadata.Type\022!\n\023abbreviated" + + "_type_id\030\016 \001(\005B\004\240\265\030\001\022\r\n\005flags\030\001 \001(\005\032\330\001\n\010" + + "Argument\022P\n\nprojection\030\001 \001(\01627.org.jetbr" + + "ains.kotlin.metadata.Type.Argument.Proje" + + "ction:\003INV\0221\n\004type\030\002 \001(\0132#.org.jetbrains" + + ".kotlin.metadata.Type\022\025\n\007type_id\030\003 \001(\005B\004", + "\240\265\030\001\"0\n\nProjection\022\006\n\002IN\020\000\022\007\n\003OUT\020\001\022\007\n\003I" + + "NV\020\002\022\010\n\004STAR\020\003*\005\010d\020\310\001\"\234\002\n\rTypeParameter\022" + + "\n\n\002id\030\001 \002(\005\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\022\026\n\007reifi" + + "ed\030\003 \001(\010:\005false\022L\n\010variance\030\004 \001(\01625.org." + + "jetbrains.kotlin.metadata.TypeParameter." + + "Variance:\003INV\0228\n\013upper_bound\030\005 \003(\0132#.org" + + ".jetbrains.kotlin.metadata.Type\022\036\n\016upper" + + "_bound_id\030\006 \003(\005B\006\020\001\240\265\030\001\"$\n\010Variance\022\006\n\002I" + + "N\020\000\022\007\n\003OUT\020\001\022\007\n\003INV\020\002*\005\010d\020\350\007\"\250\007\n\005Class\022\020" + + "\n\005flags\030\001 \001(\005:\0016\022\025\n\007fq_name\030\003 \002(\005B\004\220\265\030\001\022", + "#\n\025companion_object_name\030\004 \001(\005B\004\210\265\030\001\022D\n\016" + + "type_parameter\030\005 \003(\0132,.org.jetbrains.kot" + + "lin.metadata.TypeParameter\0226\n\tsupertype\030" + + "\006 \003(\0132#.org.jetbrains.kotlin.metadata.Ty" + + "pe\022\034\n\014supertype_id\030\002 \003(\005B\006\020\001\240\265\030\001\022!\n\021nest" + + "ed_class_name\030\007 \003(\005B\006\020\001\210\265\030\001\022?\n\013construct" + + "or\030\010 \003(\0132*.org.jetbrains.kotlin.metadata" + + ".Constructor\0229\n\010function\030\t \003(\0132\'.org.jet" + + "brains.kotlin.metadata.Function\0229\n\010prope" + + "rty\030\n \003(\0132\'.org.jetbrains.kotlin.metadat", + "a.Property\022<\n\ntype_alias\030\013 \003(\0132(.org.jet" + + "brains.kotlin.metadata.TypeAlias\022<\n\nenum" + + "_entry\030\r \003(\0132(.org.jetbrains.kotlin.meta" + + "data.EnumEntry\022\'\n\027sealed_subclass_fq_nam" + + "e\030\020 \003(\005B\006\020\001\220\265\030\001\022<\n\ntype_table\030\036 \001(\0132(.or" + + "g.jetbrains.kotlin.metadata.TypeTable\022\033\n" + + "\023version_requirement\030\037 \003(\005\022Y\n\031version_re" + + "quirement_table\030 \001(\01326.org.jetbrains.ko" + + "tlin.metadata.VersionRequirementTable\"x\n" + + "\004Kind\022\t\n\005CLASS\020\000\022\r\n\tINTERFACE\020\001\022\016\n\nENUM_", + "CLASS\020\002\022\016\n\nENUM_ENTRY\020\003\022\024\n\020ANNOTATION_CL" + + "ASS\020\004\022\n\n\006OBJECT\020\005\022\024\n\020COMPANION_OBJECT\020\006*" + + "\006\010d\020\270\224\001\"\335\002\n\007Package\0229\n\010function\030\003 \003(\0132\'." + + "org.jetbrains.kotlin.metadata.Function\0229" + + "\n\010property\030\004 \003(\0132\'.org.jetbrains.kotlin." + + "metadata.Property\022<\n\ntype_alias\030\005 \003(\0132(." + + "org.jetbrains.kotlin.metadata.TypeAlias\022" + + "<\n\ntype_table\030\036 \001(\0132(.org.jetbrains.kotl" + + "in.metadata.TypeTable\022Y\n\031version_require" + + "ment_table\030 \001(\01326.org.jetbrains.kotlin.", + "metadata.VersionRequirementTable*\005\010d\020\310\001\"" + + "`\n\tTypeTable\0221\n\004type\030\001 \003(\0132#.org.jetbrai" + + "ns.kotlin.metadata.Type\022\032\n\016first_nullabl" + + "e\030\002 \001(\005:\002-1:\004\240\273\030\001\"\214\001\n\013Constructor\022\020\n\005fla" + + "gs\030\001 \001(\005:\0016\022F\n\017value_parameter\030\002 \003(\0132-.o" + + "rg.jetbrains.kotlin.metadata.ValueParame" + + "ter\022\033\n\023version_requirement\030\037 \003(\005*\006\010d\020\270\224\001" + + "\"\246\004\n\010Function\022\020\n\005flags\030\t \001(\005:\0016\022\024\n\told_f" + + "lags\030\001 \001(\005:\0016\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0228\n\013ret" + + "urn_type\030\003 \001(\0132#.org.jetbrains.kotlin.me", + "tadata.Type\022\034\n\016return_type_id\030\007 \001(\005B\004\240\265\030" + + "\001\022D\n\016type_parameter\030\004 \003(\0132,.org.jetbrain" + + "s.kotlin.metadata.TypeParameter\022:\n\rrecei" + + "ver_type\030\005 \001(\0132#.org.jetbrains.kotlin.me" + + "tadata.Type\022\036\n\020receiver_type_id\030\010 \001(\005B\004\240" + + "\265\030\001\022F\n\017value_parameter\030\006 \003(\0132-.org.jetbr" + + "ains.kotlin.metadata.ValueParameter\022<\n\nt" + + "ype_table\030\036 \001(\0132(.org.jetbrains.kotlin.m" + + "etadata.TypeTable\022\033\n\023version_requirement" + + "\030\037 \003(\005\0229\n\010contract\030 \001(\0132\'.org.jetbrains", + ".kotlin.metadata.Contract*\006\010d\020\270\224\001\"\345\003\n\010Pr" + + "operty\022\022\n\005flags\030\013 \001(\005:\003518\022\027\n\told_flags\030" + + "\001 \001(\005:\0042054\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0228\n\013retur" + + "n_type\030\003 \001(\0132#.org.jetbrains.kotlin.meta" + + "data.Type\022\034\n\016return_type_id\030\t \001(\005B\004\240\265\030\001\022" + + "D\n\016type_parameter\030\004 \003(\0132,.org.jetbrains." + + "kotlin.metadata.TypeParameter\022:\n\rreceive" + + "r_type\030\005 \001(\0132#.org.jetbrains.kotlin.meta" + + "data.Type\022\036\n\020receiver_type_id\030\n \001(\005B\004\240\265\030" + + "\001\022M\n\026setter_value_parameter\030\006 \001(\0132-.org.", + "jetbrains.kotlin.metadata.ValueParameter" + + "\022\024\n\014getter_flags\030\007 \001(\005\022\024\n\014setter_flags\030\010" + + " \001(\005\022\033\n\023version_requirement\030\037 \003(\005*\006\010d\020\270\224" + + "\001\"\357\001\n\016ValueParameter\022\020\n\005flags\030\001 \001(\005:\0010\022\022" + + "\n\004name\030\002 \002(\005B\004\210\265\030\001\0221\n\004type\030\003 \001(\0132#.org.j" + + "etbrains.kotlin.metadata.Type\022\025\n\007type_id" + + "\030\005 \001(\005B\004\240\265\030\001\022@\n\023vararg_element_type\030\004 \001(" + + "\0132#.org.jetbrains.kotlin.metadata.Type\022$" + + "\n\026vararg_element_type_id\030\006 \001(\005B\004\240\265\030\001*\005\010d" + + "\020\310\001\"\226\003\n\tTypeAlias\022\020\n\005flags\030\001 \001(\005:\0016\022\022\n\004n", + "ame\030\002 \002(\005B\004\210\265\030\001\022D\n\016type_parameter\030\003 \003(\0132" + + ",.org.jetbrains.kotlin.metadata.TypePara" + + "meter\022<\n\017underlying_type\030\004 \001(\0132#.org.jet" + + "brains.kotlin.metadata.Type\022 \n\022underlyin" + + "g_type_id\030\005 \001(\005B\004\240\265\030\001\022:\n\rexpanded_type\030\006" + + " \001(\0132#.org.jetbrains.kotlin.metadata.Typ" + + "e\022\036\n\020expanded_type_id\030\007 \001(\005B\004\240\265\030\001\022=\n\nann" + + "otation\030\010 \003(\0132).org.jetbrains.kotlin.met" + + "adata.Annotation\022\033\n\023version_requirement\030" + + "\037 \003(\005*\005\010d\020\310\001\"&\n\tEnumEntry\022\022\n\004name\030\001 \001(\005B", + "\004\210\265\030\001*\005\010d\020\310\001\"\225\003\n\022VersionRequirement\022\017\n\007v" + + "ersion\030\001 \001(\005\022\024\n\014version_full\030\002 \001(\005\022M\n\005le" + + "vel\030\003 \001(\01627.org.jetbrains.kotlin.metadat" + + "a.VersionRequirement.Level:\005ERROR\022\022\n\nerr" + + "or_code\030\004 \001(\005\022\025\n\007message\030\005 \001(\005B\004\230\265\030\001\022e\n\014" + + "version_kind\030\006 \001(\0162=.org.jetbrains.kotli" + + "n.metadata.VersionRequirement.VersionKin" + + "d:\020LANGUAGE_VERSION\"+\n\005Level\022\013\n\007WARNING\020" + + "\000\022\t\n\005ERROR\020\001\022\n\n\006HIDDEN\020\002\"J\n\013VersionKind\022" + + "\024\n\020LANGUAGE_VERSION\020\000\022\024\n\020COMPILER_VERSIO", + "N\020\001\022\017\n\013API_VERSION\020\002\"a\n\027VersionRequireme" + + "ntTable\022F\n\013requirement\030\001 \003(\01321.org.jetbr" + + "ains.kotlin.metadata.VersionRequirement\"" + + "\217\002\n\017PackageFragment\022;\n\007strings\030\001 \001(\0132*.o" + + "rg.jetbrains.kotlin.metadata.StringTable" + + "\022J\n\017qualified_names\030\002 \001(\01321.org.jetbrain" + + "s.kotlin.metadata.QualifiedNameTable\0227\n\007" + + "package\030\003 \001(\0132&.org.jetbrains.kotlin.met" + + "adata.Package\0223\n\005class\030\004 \003(\0132$.org.jetbr" + + "ains.kotlin.metadata.Class*\005\010d\020\310\001\"A\n\010Con", + "tract\0225\n\006effect\030\001 \003(\0132%.org.jetbrains.ko" + + "tlin.metadata.Effect\"\306\003\n\006Effect\022E\n\013effec" + + "t_type\030\001 \001(\01620.org.jetbrains.kotlin.meta" + + "data.Effect.EffectType\022N\n\033effect_constru" + + "ctor_argument\030\002 \003(\0132).org.jetbrains.kotl" + + "in.metadata.Expression\022S\n conclusion_of_" + + "conditional_effect\030\003 \001(\0132).org.jetbrains" + + ".kotlin.metadata.Expression\022B\n\004kind\030\004 \001(" + + "\01624.org.jetbrains.kotlin.metadata.Effect" + + ".InvocationKind\"C\n\nEffectType\022\024\n\020RETURNS", + "_CONSTANT\020\000\022\t\n\005CALLS\020\001\022\024\n\020RETURNS_NOT_NU" + + "LL\020\002\"G\n\016InvocationKind\022\020\n\014AT_MOST_ONCE\020\000" + + "\022\020\n\014EXACTLY_ONCE\020\001\022\021\n\rAT_LEAST_ONCE\020\002\"\245\003" + + "\n\nExpression\022\020\n\005flags\030\001 \001(\005:\0010\022!\n\031value_" + + "parameter_reference\030\002 \001(\005\022O\n\016constant_va" + + "lue\030\003 \001(\01627.org.jetbrains.kotlin.metadat" + + "a.Expression.ConstantValue\022=\n\020is_instanc" + + "e_type\030\004 \001(\0132#.org.jetbrains.kotlin.meta" + + "data.Type\022!\n\023is_instance_type_id\030\005 \001(\005B\004" + + "\240\265\030\001\022?\n\014and_argument\030\006 \003(\0132).org.jetbrai", + "ns.kotlin.metadata.Expression\022>\n\013or_argu" + + "ment\030\007 \003(\0132).org.jetbrains.kotlin.metada" + + "ta.Expression\".\n\rConstantValue\022\010\n\004TRUE\020\000" + + "\022\t\n\005FALSE\020\001\022\010\n\004NULL\020\002*9\n\010Modality\022\t\n\005FIN" + + "AL\020\000\022\010\n\004OPEN\020\001\022\014\n\010ABSTRACT\020\002\022\n\n\006SEALED\020\003" + + "*b\n\nVisibility\022\014\n\010INTERNAL\020\000\022\013\n\007PRIVATE\020" + + "\001\022\r\n\tPROTECTED\020\002\022\n\n\006PUBLIC\020\003\022\023\n\017PRIVATE_" + + "TO_THIS\020\004\022\t\n\005LOCAL\020\005*Q\n\nMemberKind\022\017\n\013DE" + + "CLARATION\020\000\022\021\n\rFAKE_OVERRIDE\020\001\022\016\n\nDELEGA" + + "TION\020\002\022\017\n\013SYNTHESIZED\020\003B\017B\rDebugProtoBuf" }; org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -34650,6 +34650,8 @@ public final class DebugProtoBuf { new java.lang.String[] { "Flags", "ValueParameterReference", "ConstantValue", "IsInstanceType", "IsInstanceTypeId", "AndArgument", "OrArgument", }); org.jetbrains.kotlin.protobuf.ExtensionRegistry registry = org.jetbrains.kotlin.protobuf.ExtensionRegistry.newInstance(); + registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipMessageInComparison); + registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipMessageInComparison); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.fqNameIdInTable); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.nameIdInTable); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.stringIdInTable); @@ -34670,6 +34672,7 @@ public final class DebugProtoBuf { registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.typeIdInTable); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.nameIdInTable); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.fqNameIdInTable); + registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.skipMessageInComparison); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.nameIdInTable); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.typeIdInTable); registry.add(org.jetbrains.kotlin.metadata.DebugExtOptionsProtoBuf.typeIdInTable); diff --git a/compiler/util-klib-metadata/src/KlibMetadataProtoBuf.proto b/compiler/util-klib-metadata/src/KlibMetadataProtoBuf.proto index d409a44b6c8..30599bbf2e7 100644 --- a/compiler/util-klib-metadata/src/KlibMetadataProtoBuf.proto +++ b/compiler/util-klib-metadata/src/KlibMetadataProtoBuf.proto @@ -49,6 +49,8 @@ message File { message DescriptorUniqId { required int64 index = 1; + + option (org.jetbrains.kotlin.metadata.skip_message_in_comparison) = true; } extend org.jetbrains.kotlin.metadata.Package { @@ -58,18 +60,18 @@ extend org.jetbrains.kotlin.metadata.Package { extend org.jetbrains.kotlin.metadata.Class { repeated org.jetbrains.kotlin.metadata.Annotation class_annotation = 170; optional int32 class_file = 175 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; - optional DescriptorUniqId class_uniq_id = 171 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; + optional DescriptorUniqId class_uniq_id = 171; } extend org.jetbrains.kotlin.metadata.Constructor { repeated org.jetbrains.kotlin.metadata.Annotation constructor_annotation = 170; - optional DescriptorUniqId constructor_uniq_id = 172 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; + optional DescriptorUniqId constructor_uniq_id = 172; } extend org.jetbrains.kotlin.metadata.Function { repeated org.jetbrains.kotlin.metadata.Annotation function_annotation = 170; optional int32 function_file = 172 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; - optional DescriptorUniqId function_uniq_id = 173 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; + optional DescriptorUniqId function_uniq_id = 173; } extend org.jetbrains.kotlin.metadata.Property { @@ -78,13 +80,13 @@ extend org.jetbrains.kotlin.metadata.Property { repeated org.jetbrains.kotlin.metadata.Annotation property_setter_annotation = 178; optional org.jetbrains.kotlin.metadata.Annotation.Argument.Value compile_time_value = 173; optional int32 property_file = 176 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; - optional DescriptorUniqId property_uniq_id = 179 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; + optional DescriptorUniqId property_uniq_id = 179; } extend org.jetbrains.kotlin.metadata.EnumEntry { repeated org.jetbrains.kotlin.metadata.Annotation enum_entry_annotation = 170; optional int32 enum_entry_ordinal = 171; - optional DescriptorUniqId enum_entry_uniq_id = 172 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; + optional DescriptorUniqId enum_entry_uniq_id = 172; } extend org.jetbrains.kotlin.metadata.ValueParameter { @@ -97,7 +99,7 @@ extend org.jetbrains.kotlin.metadata.Type { extend org.jetbrains.kotlin.metadata.TypeParameter { repeated org.jetbrains.kotlin.metadata.Annotation type_parameter_annotation = 170; - optional DescriptorUniqId type_param_uniq_id = 171 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; + optional DescriptorUniqId type_param_uniq_id = 171; } extend org.jetbrains.kotlin.metadata.PackageFragment { @@ -110,5 +112,5 @@ extend org.jetbrains.kotlin.metadata.PackageFragment { extend org.jetbrains.kotlin.metadata.TypeAlias { // TODO repeated org.jetbrains.kotlin.metadata.Annotation type_alias_annotation = 130; - optional DescriptorUniqId type_alias_uniq_id = 131 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; + optional DescriptorUniqId type_alias_uniq_id = 131; } \ No newline at end of file diff --git a/core/metadata/src/ext_options.proto b/core/metadata/src/ext_options.proto index 67082267b08..bc51316c0ab 100644 --- a/core/metadata/src/ext_options.proto +++ b/core/metadata/src/ext_options.proto @@ -27,3 +27,7 @@ extend google.protobuf.FieldOptions { optional bool string_id_in_table = 50003; optional bool type_id_in_table = 50004; } + +extend google.protobuf.MessageOptions { + optional bool skip_message_in_comparison = 50100; +} diff --git a/core/metadata/src/metadata.proto b/core/metadata/src/metadata.proto index 8020f8237df..543298918c3 100644 --- a/core/metadata/src/metadata.proto +++ b/core/metadata/src/metadata.proto @@ -23,6 +23,8 @@ option optimize_for = LITE_RUNTIME; message StringTable { repeated string string = 1; + + option (skip_message_in_comparison) = true; } message QualifiedNameTable { @@ -40,6 +42,8 @@ message QualifiedNameTable { } repeated QualifiedName qualified_name = 1; + + option (skip_message_in_comparison) = true; } message Annotation { @@ -256,6 +260,8 @@ message TypeTable { // Index starting from which all types are nullable, or nothing if all types in this table are non-null. // Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space optional int32 first_nullable = 2 [default = -1]; + + option (skip_message_in_comparison) = true; } message Constructor { diff --git a/generators/tests/org/jetbrains/kotlin/generators/protobuf/GenerateProtoBufCompare.kt b/generators/tests/org/jetbrains/kotlin/generators/protobuf/GenerateProtoBufCompare.kt index 9fdf66db9e3..d134e141d19 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/protobuf/GenerateProtoBufCompare.kt +++ b/generators/tests/org/jetbrains/kotlin/generators/protobuf/GenerateProtoBufCompare.kt @@ -215,8 +215,8 @@ class GenerateProtoBufCompare { fun generateHashCodeFun(descriptor: Descriptors.Descriptor, p: Printer) { val typeName = descriptor.typeName - val fields = descriptor.fields.filter { !it.isSkip } - val extFields = extensions[descriptor]?.filter { !it.isSkip } ?: emptyList() + val fields = descriptor.fields.filter { !it.shouldSkip } + val extFields = extensions[descriptor]?.filter { !it.shouldSkip } ?: emptyList() p.println() p.println("fun $typeName.$HASH_CODE_NAME(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int, typeById: (Int) -> ProtoBuf.Type): Int {") @@ -261,8 +261,8 @@ class GenerateProtoBufCompare { fun generateForMessage(descriptor: Descriptors.Descriptor, p: Printer) { val typeName = descriptor.typeName - val fields = descriptor.fields.filter { !it.isSkip } - val extFields = extensions[descriptor]?.filter { !it.isSkip } ?: emptyList() + val fields = descriptor.fields.filter { !it.shouldSkip } + val extFields = extensions[descriptor]?.filter { !it.shouldSkip } ?: emptyList() p.println("open fun $CHECK_EQUALS_NAME(old: $typeName, new: $typeName): Boolean {") p.pushIndent() @@ -280,8 +280,8 @@ class GenerateProtoBufCompare { val typeName = descriptor.typeName val className = typeName.replace(".", "") - val fields = descriptor.fields.filter { !it.isSkip } - val extFields = extensions[descriptor]?.filter { !it.isSkip } ?: emptyList() + val fields = descriptor.fields.filter { !it.shouldSkip } + val extFields = extensions[descriptor]?.filter { !it.shouldSkip } ?: emptyList() val allFields = fields + extFields p.println("enum class ${className}Kind {") @@ -421,8 +421,12 @@ class GenerateProtoBufCompare { private val Descriptors.FieldDescriptor.statementForDiff: String get() = "$RESULT_NAME.add(${containingType.typeName.replace(".", "")}Kind.${extensions.getEnumName(this)})" - private val Descriptors.FieldDescriptor.isSkip: Boolean + private val Descriptors.Descriptor.shouldSkip: Boolean + get() = options.getExtension(DebugExtOptionsProtoBuf.skipMessageInComparison) + + private val Descriptors.FieldDescriptor.shouldSkip: Boolean get() = options.getExtension(DebugExtOptionsProtoBuf.skipInComparison) + || (type == Descriptors.FieldDescriptor.Type.MESSAGE && messageType.shouldSkip) private fun addMessageTypeToProcessIfNeeded(field: Descriptors.FieldDescriptor) { if (field.javaType == Descriptors.FieldDescriptor.JavaType.MESSAGE) { @@ -431,7 +435,7 @@ class GenerateProtoBufCompare { } private fun addMessageToProcessIfNeeded(descriptor: Descriptors.Descriptor) { - if (descriptor !in allMessages) { + if (descriptor !in allMessages && !descriptor.shouldSkip) { allMessages.add(descriptor) messagesToProcess.add(descriptor) }