reflect/prototype: hoist semantic options into builders
Add fields to the Message and Field builder structs which hold the value
of MessageOptions.map_entry, FieldOptions.packed, and FieldOptions.weak
options. Remove all access to the contents of options messages from the
prototype package.
Change IsPacked to always return false for unpackable field types,
which is consistent with the equivalent C++ API.
This change helps avoid dependency cycles between prototype and the
options messages. (Previously this was resolved by accessing options
with reflection, but just breaking the dependency from prototype to the
options message is cleaner and simpler.)
Change-Id: I756aefe2e04cfa8fea31eaaaa0b5a99d4ac9e851
Reviewed-on: https://go-review.googlesource.com/c/153517
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
diff --git a/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go b/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go
index 71b33e9..ef72ffd 100644
--- a/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go
+++ b/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go
@@ -198,6 +198,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "AnnotationsTestField",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/comments/comments.pb.go b/cmd/protoc-gen-go/testdata/comments/comments.pb.go
index 17d1200..ad1462b 100644
--- a/cmd/protoc-gen-go/testdata/comments/comments.pb.go
+++ b/cmd/protoc-gen-go/testdata/comments/comments.pb.go
@@ -458,6 +458,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "Field1A",
+ IsPacked: prototype.False,
},
{
Name: "Oneof1AField1",
@@ -466,6 +467,7 @@
Kind: protoreflect.StringKind,
JSONName: "Oneof1AField1",
OneofName: "Oneof1a",
+ IsPacked: prototype.False,
},
},
Oneofs: []prototype.Oneof{
diff --git a/cmd/protoc-gen-go/testdata/comments/deprecated.pb.go b/cmd/protoc-gen-go/testdata/comments/deprecated.pb.go
index 86e7968..ae3d74b 100644
--- a/cmd/protoc-gen-go/testdata/comments/deprecated.pb.go
+++ b/cmd/protoc-gen-go/testdata/comments/deprecated.pb.go
@@ -184,6 +184,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "deprecatedField",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go b/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go
index 602d373..6dfb1f6 100644
--- a/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go
+++ b/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go
@@ -206,6 +206,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "field",
+ IsPacked: prototype.False,
},
},
ExtensionRanges: [][2]protoreflect.FieldNumber{{4, 10}, {16, 536870912}},
diff --git a/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go b/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go
index e0b3b5b..2a948e1 100644
--- a/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go
+++ b/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go
@@ -1131,6 +1131,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.BytesKind,
JSONName: "data",
+ IsPacked: prototype.False,
},
},
},
@@ -1143,6 +1144,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "extensionGroup",
+ IsPacked: prototype.False,
},
},
},
@@ -1158,6 +1160,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.StringKind,
JSONName: "repeatedXGroup",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go b/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go
index 9bcf01a..a01577f 100644
--- a/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go
+++ b/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go
@@ -128,6 +128,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.BytesKind,
JSONName: "data",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go b/cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go
index 32866bb..fff2bd7 100644
--- a/cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go
+++ b/cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go
@@ -426,6 +426,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "fieldOne",
+ IsPacked: prototype.False,
},
{
Name: "FieldTwo",
@@ -433,6 +434,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "FieldTwo",
+ IsPacked: prototype.False,
},
{
Name: "fieldThree",
@@ -440,6 +442,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "fieldThree",
+ IsPacked: prototype.False,
},
{
Name: "field__four",
@@ -447,6 +450,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "fieldFour",
+ IsPacked: prototype.False,
},
{
Name: "descriptor",
@@ -454,6 +458,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "descriptor",
+ IsPacked: prototype.False,
},
{
Name: "marshal",
@@ -461,6 +466,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "marshal",
+ IsPacked: prototype.False,
},
{
Name: "unmarshal",
@@ -468,6 +474,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "unmarshal",
+ IsPacked: prototype.False,
},
{
Name: "proto_message",
@@ -475,6 +482,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "protoMessage",
+ IsPacked: prototype.False,
},
{
Name: "CamelCase",
@@ -482,6 +490,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "CamelCase",
+ IsPacked: prototype.False,
},
{
Name: "CamelCase_",
@@ -489,6 +498,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "CamelCase",
+ IsPacked: prototype.False,
},
{
Name: "camel_case",
@@ -496,6 +506,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "camelCase",
+ IsPacked: prototype.False,
},
{
Name: "CamelCase__",
@@ -503,6 +514,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "CamelCase",
+ IsPacked: prototype.False,
},
{
Name: "get_name",
@@ -510,6 +522,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "getName",
+ IsPacked: prototype.False,
},
{
Name: "name",
@@ -517,6 +530,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "name",
+ IsPacked: prototype.False,
},
{
Name: "OneofConflictA",
@@ -525,6 +539,7 @@
Kind: protoreflect.StringKind,
JSONName: "OneofConflictA",
OneofName: "oneof_conflict_a",
+ IsPacked: prototype.False,
},
{
Name: "oneof_no_conflict",
@@ -533,6 +548,7 @@
Kind: protoreflect.StringKind,
JSONName: "oneofNoConflict",
OneofName: "oneof_conflict_b",
+ IsPacked: prototype.False,
},
{
Name: "OneofConflictB",
@@ -541,6 +557,7 @@
Kind: protoreflect.StringKind,
JSONName: "OneofConflictB",
OneofName: "oneof_conflict_b",
+ IsPacked: prototype.False,
},
{
Name: "oneof_message_conflict",
@@ -549,6 +566,7 @@
Kind: protoreflect.StringKind,
JSONName: "oneofMessageConflict",
OneofName: "oneof_conflict_c",
+ IsPacked: prototype.False,
},
},
Oneofs: []prototype.Oneof{
diff --git a/cmd/protoc-gen-go/testdata/import_public/a.pb.go b/cmd/protoc-gen-go/testdata/import_public/a.pb.go
index e324cc2..5cb190b 100644
--- a/cmd/protoc-gen-go/testdata/import_public/a.pb.go
+++ b/cmd/protoc-gen-go/testdata/import_public/a.pb.go
@@ -196,6 +196,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "m",
+ IsPacked: prototype.False,
},
{
Name: "e",
@@ -203,6 +204,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.EnumKind,
JSONName: "e",
+ IsPacked: prototype.False,
},
{
Name: "local",
@@ -210,6 +212,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "local",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/import_public/b.pb.go b/cmd/protoc-gen-go/testdata/import_public/b.pb.go
index 9b6589e..878425a 100644
--- a/cmd/protoc-gen-go/testdata/import_public/b.pb.go
+++ b/cmd/protoc-gen-go/testdata/import_public/b.pb.go
@@ -143,6 +143,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "m",
+ IsPacked: prototype.False,
},
{
Name: "e",
@@ -150,6 +151,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.EnumKind,
JSONName: "e",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go b/cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go
index ec8b341..faefc5e 100644
--- a/cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go
+++ b/cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go
@@ -546,6 +546,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "m2",
+ IsPacked: prototype.False,
},
{
Name: "s",
@@ -554,6 +555,7 @@
Kind: protoreflect.StringKind,
JSONName: "s",
Default: protoreflect.ValueOf(string("default")),
+ IsPacked: prototype.False,
},
{
Name: "b",
@@ -562,6 +564,7 @@
Kind: protoreflect.BytesKind,
JSONName: "b",
Default: protoreflect.ValueOf(("default")),
+ IsPacked: prototype.False,
},
{
Name: "f",
@@ -570,6 +573,7 @@
Kind: protoreflect.DoubleKind,
JSONName: "f",
Default: protoreflect.ValueOf(float64(math.NaN())),
+ IsPacked: prototype.False,
},
{
Name: "oneof_int32",
@@ -578,6 +582,7 @@
Kind: protoreflect.Int32Kind,
JSONName: "oneofInt32",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_int64",
@@ -586,6 +591,7 @@
Kind: protoreflect.Int64Kind,
JSONName: "oneofInt64",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
},
Oneofs: []prototype.Oneof{
@@ -603,6 +609,7 @@
Kind: protoreflect.Int32Kind,
JSONName: "submessageOneofInt32",
OneofName: "submessage_oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "submessage_oneof_int64",
@@ -611,6 +618,7 @@
Kind: protoreflect.Int64Kind,
JSONName: "submessageOneofInt64",
OneofName: "submessage_oneof_field",
+ IsPacked: prototype.False,
},
},
Oneofs: []prototype.Oneof{
diff --git a/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go b/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go
index 50006a4..91da206 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go
@@ -241,6 +241,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "m1",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go b/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go
index 67f5a50..fcb6000 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go
@@ -133,6 +133,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "f",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go b/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go
index 070d020..20ec02c 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go
@@ -133,6 +133,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "f",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go b/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go
index f4265e2..1ddae96 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go
@@ -184,6 +184,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "am1",
+ IsPacked: prototype.False,
},
{
Name: "am2",
@@ -191,6 +192,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "am2",
+ IsPacked: prototype.False,
},
{
Name: "bm1",
@@ -198,6 +200,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "bm1",
+ IsPacked: prototype.False,
},
{
Name: "bm2",
@@ -205,6 +208,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "bm2",
+ IsPacked: prototype.False,
},
{
Name: "fmt",
@@ -212,6 +216,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "fmt",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go b/cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go
index 4174d6d..6bfdcee 100644
--- a/cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go
+++ b/cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go
@@ -205,6 +205,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "stringField",
+ IsPacked: prototype.False,
},
{
Name: "enum_field",
@@ -213,6 +214,7 @@
Kind: protoreflect.EnumKind,
JSONName: "enumField",
Default: protoreflect.ValueOf(string("ZERO")),
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/proto2/enum.pb.go b/cmd/protoc-gen-go/testdata/proto2/enum.pb.go
index 3ff891b..f5d0dd4 100644
--- a/cmd/protoc-gen-go/testdata/proto2/enum.pb.go
+++ b/cmd/protoc-gen-go/testdata/proto2/enum.pb.go
@@ -611,6 +611,7 @@
Kind: protoreflect.EnumKind,
JSONName: "defaultDuplicate1",
Default: protoreflect.ValueOf(string("duplicate1")),
+ IsPacked: prototype.False,
},
{
Name: "default_duplicate2",
@@ -619,6 +620,7 @@
Kind: protoreflect.EnumKind,
JSONName: "defaultDuplicate2",
Default: protoreflect.ValueOf(string("duplicate2")),
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/proto2/fields.pb.go b/cmd/protoc-gen-go/testdata/proto2/fields.pb.go
index e296e51..0e51367 100644
--- a/cmd/protoc-gen-go/testdata/proto2/fields.pb.go
+++ b/cmd/protoc-gen-go/testdata/proto2/fields.pb.go
@@ -1673,6 +1673,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.BoolKind,
JSONName: "optionalBool",
+ IsPacked: prototype.False,
},
{
Name: "optional_enum",
@@ -1680,6 +1681,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.EnumKind,
JSONName: "optionalEnum",
+ IsPacked: prototype.False,
},
{
Name: "optional_int32",
@@ -1687,6 +1689,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Int32Kind,
JSONName: "optionalInt32",
+ IsPacked: prototype.False,
},
{
Name: "optional_sint32",
@@ -1694,6 +1697,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Sint32Kind,
JSONName: "optionalSint32",
+ IsPacked: prototype.False,
},
{
Name: "optional_uint32",
@@ -1701,6 +1705,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Uint32Kind,
JSONName: "optionalUint32",
+ IsPacked: prototype.False,
},
{
Name: "optional_int64",
@@ -1708,6 +1713,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Int64Kind,
JSONName: "optionalInt64",
+ IsPacked: prototype.False,
},
{
Name: "optional_sint64",
@@ -1715,6 +1721,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Sint64Kind,
JSONName: "optionalSint64",
+ IsPacked: prototype.False,
},
{
Name: "optional_uint64",
@@ -1722,6 +1729,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Uint64Kind,
JSONName: "optionalUint64",
+ IsPacked: prototype.False,
},
{
Name: "optional_sfixed32",
@@ -1729,6 +1737,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Sfixed32Kind,
JSONName: "optionalSfixed32",
+ IsPacked: prototype.False,
},
{
Name: "optional_fixed32",
@@ -1736,6 +1745,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Fixed32Kind,
JSONName: "optionalFixed32",
+ IsPacked: prototype.False,
},
{
Name: "optional_float",
@@ -1743,6 +1753,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.FloatKind,
JSONName: "optionalFloat",
+ IsPacked: prototype.False,
},
{
Name: "optional_sfixed64",
@@ -1750,6 +1761,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Sfixed64Kind,
JSONName: "optionalSfixed64",
+ IsPacked: prototype.False,
},
{
Name: "optional_fixed64",
@@ -1757,6 +1769,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Fixed64Kind,
JSONName: "optionalFixed64",
+ IsPacked: prototype.False,
},
{
Name: "optional_double",
@@ -1764,6 +1777,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.DoubleKind,
JSONName: "optionalDouble",
+ IsPacked: prototype.False,
},
{
Name: "optional_string",
@@ -1771,6 +1785,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "optionalString",
+ IsPacked: prototype.False,
},
{
Name: "optional_bytes",
@@ -1778,6 +1793,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.BytesKind,
JSONName: "optionalBytes",
+ IsPacked: prototype.False,
},
{
Name: "optional_Message",
@@ -1785,6 +1801,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "optionalMessage",
+ IsPacked: prototype.False,
},
{
Name: "optionalgroup",
@@ -1792,6 +1809,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.GroupKind,
JSONName: "optionalgroup",
+ IsPacked: prototype.False,
},
{
Name: "required_bool",
@@ -1799,6 +1817,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.BoolKind,
JSONName: "requiredBool",
+ IsPacked: prototype.False,
},
{
Name: "required_enum",
@@ -1806,6 +1825,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.EnumKind,
JSONName: "requiredEnum",
+ IsPacked: prototype.False,
},
{
Name: "required_int32",
@@ -1813,6 +1833,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.Int32Kind,
JSONName: "requiredInt32",
+ IsPacked: prototype.False,
},
{
Name: "required_sint32",
@@ -1820,6 +1841,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.Sint32Kind,
JSONName: "requiredSint32",
+ IsPacked: prototype.False,
},
{
Name: "required_uint32",
@@ -1827,6 +1849,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.Uint32Kind,
JSONName: "requiredUint32",
+ IsPacked: prototype.False,
},
{
Name: "required_int64",
@@ -1834,6 +1857,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.Int64Kind,
JSONName: "requiredInt64",
+ IsPacked: prototype.False,
},
{
Name: "required_sint64",
@@ -1841,6 +1865,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.Sint64Kind,
JSONName: "requiredSint64",
+ IsPacked: prototype.False,
},
{
Name: "required_uint64",
@@ -1848,6 +1873,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.Uint64Kind,
JSONName: "requiredUint64",
+ IsPacked: prototype.False,
},
{
Name: "required_sfixed32",
@@ -1855,6 +1881,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.Sfixed32Kind,
JSONName: "requiredSfixed32",
+ IsPacked: prototype.False,
},
{
Name: "required_fixed32",
@@ -1862,6 +1889,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.Fixed32Kind,
JSONName: "requiredFixed32",
+ IsPacked: prototype.False,
},
{
Name: "required_float",
@@ -1869,6 +1897,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.FloatKind,
JSONName: "requiredFloat",
+ IsPacked: prototype.False,
},
{
Name: "required_sfixed64",
@@ -1876,6 +1905,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.Sfixed64Kind,
JSONName: "requiredSfixed64",
+ IsPacked: prototype.False,
},
{
Name: "required_fixed64",
@@ -1883,6 +1913,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.Fixed64Kind,
JSONName: "requiredFixed64",
+ IsPacked: prototype.False,
},
{
Name: "required_double",
@@ -1890,6 +1921,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.DoubleKind,
JSONName: "requiredDouble",
+ IsPacked: prototype.False,
},
{
Name: "required_string",
@@ -1897,6 +1929,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.StringKind,
JSONName: "requiredString",
+ IsPacked: prototype.False,
},
{
Name: "required_bytes",
@@ -1904,6 +1937,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.BytesKind,
JSONName: "requiredBytes",
+ IsPacked: prototype.False,
},
{
Name: "required_Message",
@@ -1911,6 +1945,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.MessageKind,
JSONName: "requiredMessage",
+ IsPacked: prototype.False,
},
{
Name: "requiredgroup",
@@ -1918,6 +1953,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.GroupKind,
JSONName: "requiredgroup",
+ IsPacked: prototype.False,
},
{
Name: "repeated_bool",
@@ -1925,6 +1961,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.BoolKind,
JSONName: "repeatedBool",
+ IsPacked: prototype.False,
},
{
Name: "repeated_enum",
@@ -1932,6 +1969,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.EnumKind,
JSONName: "repeatedEnum",
+ IsPacked: prototype.False,
},
{
Name: "repeated_int32",
@@ -1939,6 +1977,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Int32Kind,
JSONName: "repeatedInt32",
+ IsPacked: prototype.False,
},
{
Name: "repeated_sint32",
@@ -1946,6 +1985,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Sint32Kind,
JSONName: "repeatedSint32",
+ IsPacked: prototype.False,
},
{
Name: "repeated_uint32",
@@ -1953,6 +1993,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Uint32Kind,
JSONName: "repeatedUint32",
+ IsPacked: prototype.False,
},
{
Name: "repeated_int64",
@@ -1960,6 +2001,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Int64Kind,
JSONName: "repeatedInt64",
+ IsPacked: prototype.False,
},
{
Name: "repeated_sint64",
@@ -1967,6 +2009,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Sint64Kind,
JSONName: "repeatedSint64",
+ IsPacked: prototype.False,
},
{
Name: "repeated_uint64",
@@ -1974,6 +2017,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Uint64Kind,
JSONName: "repeatedUint64",
+ IsPacked: prototype.False,
},
{
Name: "repeated_sfixed32",
@@ -1981,6 +2025,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Sfixed32Kind,
JSONName: "repeatedSfixed32",
+ IsPacked: prototype.False,
},
{
Name: "repeated_fixed32",
@@ -1988,6 +2033,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Fixed32Kind,
JSONName: "repeatedFixed32",
+ IsPacked: prototype.False,
},
{
Name: "repeated_float",
@@ -1995,6 +2041,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.FloatKind,
JSONName: "repeatedFloat",
+ IsPacked: prototype.False,
},
{
Name: "repeated_sfixed64",
@@ -2002,6 +2049,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Sfixed64Kind,
JSONName: "repeatedSfixed64",
+ IsPacked: prototype.False,
},
{
Name: "repeated_fixed64",
@@ -2009,6 +2057,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Fixed64Kind,
JSONName: "repeatedFixed64",
+ IsPacked: prototype.False,
},
{
Name: "repeated_double",
@@ -2016,6 +2065,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.DoubleKind,
JSONName: "repeatedDouble",
+ IsPacked: prototype.False,
},
{
Name: "repeated_string",
@@ -2023,6 +2073,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.StringKind,
JSONName: "repeatedString",
+ IsPacked: prototype.False,
},
{
Name: "repeated_bytes",
@@ -2030,6 +2081,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.BytesKind,
JSONName: "repeatedBytes",
+ IsPacked: prototype.False,
},
{
Name: "repeated_Message",
@@ -2037,6 +2089,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.MessageKind,
JSONName: "repeatedMessage",
+ IsPacked: prototype.False,
},
{
Name: "repeatedgroup",
@@ -2044,6 +2097,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.GroupKind,
JSONName: "repeatedgroup",
+ IsPacked: prototype.False,
},
{
Name: "default_bool",
@@ -2052,6 +2106,7 @@
Kind: protoreflect.BoolKind,
JSONName: "defaultBool",
Default: protoreflect.ValueOf(bool(true)),
+ IsPacked: prototype.False,
},
{
Name: "default_enum",
@@ -2060,6 +2115,7 @@
Kind: protoreflect.EnumKind,
JSONName: "defaultEnum",
Default: protoreflect.ValueOf(string("ONE")),
+ IsPacked: prototype.False,
},
{
Name: "default_int32",
@@ -2068,6 +2124,7 @@
Kind: protoreflect.Int32Kind,
JSONName: "defaultInt32",
Default: protoreflect.ValueOf(int32(1)),
+ IsPacked: prototype.False,
},
{
Name: "default_sint32",
@@ -2076,6 +2133,7 @@
Kind: protoreflect.Sint32Kind,
JSONName: "defaultSint32",
Default: protoreflect.ValueOf(int32(1)),
+ IsPacked: prototype.False,
},
{
Name: "default_uint32",
@@ -2084,6 +2142,7 @@
Kind: protoreflect.Uint32Kind,
JSONName: "defaultUint32",
Default: protoreflect.ValueOf(uint32(1)),
+ IsPacked: prototype.False,
},
{
Name: "default_int64",
@@ -2092,6 +2151,7 @@
Kind: protoreflect.Int64Kind,
JSONName: "defaultInt64",
Default: protoreflect.ValueOf(int64(1)),
+ IsPacked: prototype.False,
},
{
Name: "default_sint64",
@@ -2100,6 +2160,7 @@
Kind: protoreflect.Sint64Kind,
JSONName: "defaultSint64",
Default: protoreflect.ValueOf(int64(1)),
+ IsPacked: prototype.False,
},
{
Name: "default_uint64",
@@ -2108,6 +2169,7 @@
Kind: protoreflect.Uint64Kind,
JSONName: "defaultUint64",
Default: protoreflect.ValueOf(uint64(1)),
+ IsPacked: prototype.False,
},
{
Name: "default_sfixed32",
@@ -2116,6 +2178,7 @@
Kind: protoreflect.Sfixed32Kind,
JSONName: "defaultSfixed32",
Default: protoreflect.ValueOf(int32(1)),
+ IsPacked: prototype.False,
},
{
Name: "default_fixed32",
@@ -2124,6 +2187,7 @@
Kind: protoreflect.Fixed32Kind,
JSONName: "defaultFixed32",
Default: protoreflect.ValueOf(uint32(1)),
+ IsPacked: prototype.False,
},
{
Name: "default_float",
@@ -2132,6 +2196,7 @@
Kind: protoreflect.FloatKind,
JSONName: "defaultFloat",
Default: protoreflect.ValueOf(float32(3.14)),
+ IsPacked: prototype.False,
},
{
Name: "default_sfixed64",
@@ -2140,6 +2205,7 @@
Kind: protoreflect.Sfixed64Kind,
JSONName: "defaultSfixed64",
Default: protoreflect.ValueOf(int64(1)),
+ IsPacked: prototype.False,
},
{
Name: "default_fixed64",
@@ -2148,6 +2214,7 @@
Kind: protoreflect.Fixed64Kind,
JSONName: "defaultFixed64",
Default: protoreflect.ValueOf(uint64(1)),
+ IsPacked: prototype.False,
},
{
Name: "default_double",
@@ -2156,6 +2223,7 @@
Kind: protoreflect.DoubleKind,
JSONName: "defaultDouble",
Default: protoreflect.ValueOf(float64(3.1415)),
+ IsPacked: prototype.False,
},
{
Name: "default_string",
@@ -2164,6 +2232,7 @@
Kind: protoreflect.StringKind,
JSONName: "defaultString",
Default: protoreflect.ValueOf(string("hello,\"world!\"\n")),
+ IsPacked: prototype.False,
},
{
Name: "default_bytes",
@@ -2172,6 +2241,7 @@
Kind: protoreflect.BytesKind,
JSONName: "defaultBytes",
Default: protoreflect.ValueOf(("hello,ޭ\xbe\xef")),
+ IsPacked: prototype.False,
},
{
Name: "default_zero_string",
@@ -2180,6 +2250,7 @@
Kind: protoreflect.StringKind,
JSONName: "defaultZeroString",
Default: protoreflect.ValueOf(string("")),
+ IsPacked: prototype.False,
},
{
Name: "default_zero_bytes",
@@ -2188,6 +2259,7 @@
Kind: protoreflect.BytesKind,
JSONName: "defaultZeroBytes",
Default: protoreflect.ValueOf(("")),
+ IsPacked: prototype.False,
},
{
Name: "default_float_neginf",
@@ -2196,6 +2268,7 @@
Kind: protoreflect.FloatKind,
JSONName: "defaultFloatNeginf",
Default: protoreflect.ValueOf(float32(math.Inf(-1))),
+ IsPacked: prototype.False,
},
{
Name: "default_float_posinf",
@@ -2204,6 +2277,7 @@
Kind: protoreflect.FloatKind,
JSONName: "defaultFloatPosinf",
Default: protoreflect.ValueOf(float32(math.Inf(+1))),
+ IsPacked: prototype.False,
},
{
Name: "default_float_nan",
@@ -2212,6 +2286,7 @@
Kind: protoreflect.FloatKind,
JSONName: "defaultFloatNan",
Default: protoreflect.ValueOf(float32(math.NaN())),
+ IsPacked: prototype.False,
},
{
Name: "default_double_neginf",
@@ -2220,6 +2295,7 @@
Kind: protoreflect.DoubleKind,
JSONName: "defaultDoubleNeginf",
Default: protoreflect.ValueOf(float64(math.Inf(-1))),
+ IsPacked: prototype.False,
},
{
Name: "default_double_posinf",
@@ -2228,6 +2304,7 @@
Kind: protoreflect.DoubleKind,
JSONName: "defaultDoublePosinf",
Default: protoreflect.ValueOf(float64(math.Inf(+1))),
+ IsPacked: prototype.False,
},
{
Name: "default_double_nan",
@@ -2236,6 +2313,7 @@
Kind: protoreflect.DoubleKind,
JSONName: "defaultDoubleNan",
Default: protoreflect.ValueOf(float64(math.NaN())),
+ IsPacked: prototype.False,
},
{
Name: "map_int32_int64",
@@ -2243,6 +2321,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.MessageKind,
JSONName: "mapInt32Int64",
+ IsPacked: prototype.False,
},
{
Name: "map_string_message",
@@ -2250,6 +2329,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.MessageKind,
JSONName: "mapStringMessage",
+ IsPacked: prototype.False,
},
{
Name: "map_fixed64_enum",
@@ -2257,6 +2337,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.MessageKind,
JSONName: "mapFixed64Enum",
+ IsPacked: prototype.False,
},
{
Name: "oneof_bool",
@@ -2265,6 +2346,7 @@
Kind: protoreflect.BoolKind,
JSONName: "oneofBool",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_enum",
@@ -2273,6 +2355,7 @@
Kind: protoreflect.EnumKind,
JSONName: "oneofEnum",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_int32",
@@ -2281,6 +2364,7 @@
Kind: protoreflect.Int32Kind,
JSONName: "oneofInt32",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_sint32",
@@ -2289,6 +2373,7 @@
Kind: protoreflect.Sint32Kind,
JSONName: "oneofSint32",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_uint32",
@@ -2297,6 +2382,7 @@
Kind: protoreflect.Uint32Kind,
JSONName: "oneofUint32",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_int64",
@@ -2305,6 +2391,7 @@
Kind: protoreflect.Int64Kind,
JSONName: "oneofInt64",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_sint64",
@@ -2313,6 +2400,7 @@
Kind: protoreflect.Sint64Kind,
JSONName: "oneofSint64",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_uint64",
@@ -2321,6 +2409,7 @@
Kind: protoreflect.Uint64Kind,
JSONName: "oneofUint64",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_sfixed32",
@@ -2329,6 +2418,7 @@
Kind: protoreflect.Sfixed32Kind,
JSONName: "oneofSfixed32",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_fixed32",
@@ -2337,6 +2427,7 @@
Kind: protoreflect.Fixed32Kind,
JSONName: "oneofFixed32",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_float",
@@ -2345,6 +2436,7 @@
Kind: protoreflect.FloatKind,
JSONName: "oneofFloat",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_sfixed64",
@@ -2353,6 +2445,7 @@
Kind: protoreflect.Sfixed64Kind,
JSONName: "oneofSfixed64",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_fixed64",
@@ -2361,6 +2454,7 @@
Kind: protoreflect.Fixed64Kind,
JSONName: "oneofFixed64",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_double",
@@ -2369,6 +2463,7 @@
Kind: protoreflect.DoubleKind,
JSONName: "oneofDouble",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_string",
@@ -2377,6 +2472,7 @@
Kind: protoreflect.StringKind,
JSONName: "oneofString",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_bytes",
@@ -2385,6 +2481,7 @@
Kind: protoreflect.BytesKind,
JSONName: "oneofBytes",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_Message",
@@ -2393,6 +2490,7 @@
Kind: protoreflect.MessageKind,
JSONName: "oneofMessage",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneofgroup",
@@ -2401,6 +2499,7 @@
Kind: protoreflect.GroupKind,
JSONName: "oneofgroup",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_largest_tag",
@@ -2409,6 +2508,7 @@
Kind: protoreflect.Int32Kind,
JSONName: "oneofLargestTag",
OneofName: "oneof_field",
+ IsPacked: prototype.False,
},
{
Name: "oneof_two_1",
@@ -2417,6 +2517,7 @@
Kind: protoreflect.Int32Kind,
JSONName: "oneofTwo1",
OneofName: "oneof_two",
+ IsPacked: prototype.False,
},
{
Name: "oneof_two_2",
@@ -2425,6 +2526,7 @@
Kind: protoreflect.Int64Kind,
JSONName: "oneofTwo2",
OneofName: "oneof_two",
+ IsPacked: prototype.False,
},
},
Oneofs: []prototype.Oneof{
@@ -2443,6 +2545,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "optionalGroup",
+ IsPacked: prototype.False,
},
},
},
@@ -2455,6 +2558,7 @@
Cardinality: protoreflect.Required,
Kind: protoreflect.StringKind,
JSONName: "requiredGroup",
+ IsPacked: prototype.False,
},
},
},
@@ -2467,6 +2571,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.StringKind,
JSONName: "repeatedGroup",
+ IsPacked: prototype.False,
},
},
},
@@ -2479,6 +2584,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Int32Kind,
JSONName: "key",
+ IsPacked: prototype.False,
},
{
Name: "value",
@@ -2486,8 +2592,10 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Int64Kind,
JSONName: "value",
+ IsPacked: prototype.False,
},
},
+ IsMapEntry: true,
},
{
Name: "MapStringMessageEntry",
@@ -2498,6 +2606,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "key",
+ IsPacked: prototype.False,
},
{
Name: "value",
@@ -2505,8 +2614,10 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "value",
+ IsPacked: prototype.False,
},
},
+ IsMapEntry: true,
},
{
Name: "MapFixed64EnumEntry",
@@ -2517,6 +2628,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Fixed64Kind,
JSONName: "key",
+ IsPacked: prototype.False,
},
{
Name: "value",
@@ -2524,8 +2636,10 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.EnumKind,
JSONName: "value",
+ IsPacked: prototype.False,
},
},
+ IsMapEntry: true,
},
{
Name: "OneofGroup",
@@ -2536,6 +2650,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "oneofGroupField",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go b/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go
index 19061d3..e47c90f 100644
--- a/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go
+++ b/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go
@@ -263,6 +263,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "l2",
+ IsPacked: prototype.False,
},
{
Name: "l3",
@@ -270,6 +271,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "l3",
+ IsPacked: prototype.False,
},
},
},
@@ -282,6 +284,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "l3",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go b/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go
index db64579..7630e86 100644
--- a/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go
+++ b/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go
@@ -137,6 +137,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Int32Kind,
JSONName: "i32",
+ IsPacked: prototype.False,
},
{
Name: "m",
@@ -144,6 +145,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "m",
+ IsPacked: prototype.False,
},
},
},
diff --git a/cmd/protoc-gen-go/testdata/proto3/fields.pb.go b/cmd/protoc-gen-go/testdata/proto3/fields.pb.go
index 293a5b3..1701832 100644
--- a/cmd/protoc-gen-go/testdata/proto3/fields.pb.go
+++ b/cmd/protoc-gen-go/testdata/proto3/fields.pb.go
@@ -582,6 +582,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "optionalBool",
+ IsPacked: prototype.False,
},
{
Name: "optional_enum",
@@ -589,6 +590,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.EnumKind,
JSONName: "optionalEnum",
+ IsPacked: prototype.False,
},
{
Name: "optional_int32",
@@ -596,6 +598,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Int32Kind,
JSONName: "optionalInt32",
+ IsPacked: prototype.False,
},
{
Name: "optional_sint32",
@@ -603,6 +606,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Sint32Kind,
JSONName: "optionalSint32",
+ IsPacked: prototype.False,
},
{
Name: "optional_uint32",
@@ -610,6 +614,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Uint32Kind,
JSONName: "optionalUint32",
+ IsPacked: prototype.False,
},
{
Name: "optional_int64",
@@ -617,6 +622,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Int64Kind,
JSONName: "optionalInt64",
+ IsPacked: prototype.False,
},
{
Name: "optional_sint64",
@@ -624,6 +630,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Sint64Kind,
JSONName: "optionalSint64",
+ IsPacked: prototype.False,
},
{
Name: "optional_uint64",
@@ -631,6 +638,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Uint64Kind,
JSONName: "optionalUint64",
+ IsPacked: prototype.False,
},
{
Name: "optional_sfixed32",
@@ -638,6 +646,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Sfixed32Kind,
JSONName: "optionalSfixed32",
+ IsPacked: prototype.False,
},
{
Name: "optional_fixed32",
@@ -645,6 +654,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Fixed32Kind,
JSONName: "optionalFixed32",
+ IsPacked: prototype.False,
},
{
Name: "optional_float",
@@ -652,6 +662,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.FloatKind,
JSONName: "optionalFloat",
+ IsPacked: prototype.False,
},
{
Name: "optional_sfixed64",
@@ -659,6 +670,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Sfixed64Kind,
JSONName: "optionalSfixed64",
+ IsPacked: prototype.False,
},
{
Name: "optional_fixed64",
@@ -666,6 +678,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Fixed64Kind,
JSONName: "optionalFixed64",
+ IsPacked: prototype.False,
},
{
Name: "optional_double",
@@ -673,6 +686,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.DoubleKind,
JSONName: "optionalDouble",
+ IsPacked: prototype.False,
},
{
Name: "optional_string",
@@ -680,6 +694,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "optionalString",
+ IsPacked: prototype.False,
},
{
Name: "optional_bytes",
@@ -687,6 +702,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.BytesKind,
JSONName: "optionalBytes",
+ IsPacked: prototype.False,
},
{
Name: "optional_Message",
@@ -694,6 +710,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "optionalMessage",
+ IsPacked: prototype.False,
},
{
Name: "repeated_bool",
@@ -701,6 +718,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.BoolKind,
JSONName: "repeatedBool",
+ IsPacked: prototype.True,
},
{
Name: "repeated_enum",
@@ -708,6 +726,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.EnumKind,
JSONName: "repeatedEnum",
+ IsPacked: prototype.True,
},
{
Name: "repeated_int32",
@@ -715,6 +734,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Int32Kind,
JSONName: "repeatedInt32",
+ IsPacked: prototype.True,
},
{
Name: "repeated_sint32",
@@ -722,6 +742,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Sint32Kind,
JSONName: "repeatedSint32",
+ IsPacked: prototype.True,
},
{
Name: "repeated_uint32",
@@ -729,6 +750,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Uint32Kind,
JSONName: "repeatedUint32",
+ IsPacked: prototype.True,
},
{
Name: "repeated_int64",
@@ -736,6 +758,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Int64Kind,
JSONName: "repeatedInt64",
+ IsPacked: prototype.True,
},
{
Name: "repeated_sint64",
@@ -743,6 +766,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Sint64Kind,
JSONName: "repeatedSint64",
+ IsPacked: prototype.True,
},
{
Name: "repeated_uint64",
@@ -750,6 +774,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Uint64Kind,
JSONName: "repeatedUint64",
+ IsPacked: prototype.True,
},
{
Name: "repeated_sfixed32",
@@ -757,6 +782,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Sfixed32Kind,
JSONName: "repeatedSfixed32",
+ IsPacked: prototype.True,
},
{
Name: "repeated_fixed32",
@@ -764,6 +790,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Fixed32Kind,
JSONName: "repeatedFixed32",
+ IsPacked: prototype.True,
},
{
Name: "repeated_float",
@@ -771,6 +798,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.FloatKind,
JSONName: "repeatedFloat",
+ IsPacked: prototype.True,
},
{
Name: "repeated_sfixed64",
@@ -778,6 +806,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Sfixed64Kind,
JSONName: "repeatedSfixed64",
+ IsPacked: prototype.True,
},
{
Name: "repeated_fixed64",
@@ -785,6 +814,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.Fixed64Kind,
JSONName: "repeatedFixed64",
+ IsPacked: prototype.True,
},
{
Name: "repeated_double",
@@ -792,6 +822,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.DoubleKind,
JSONName: "repeatedDouble",
+ IsPacked: prototype.True,
},
{
Name: "repeated_string",
@@ -799,6 +830,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.StringKind,
JSONName: "repeatedString",
+ IsPacked: prototype.False,
},
{
Name: "repeated_bytes",
@@ -806,6 +838,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.BytesKind,
JSONName: "repeatedBytes",
+ IsPacked: prototype.False,
},
{
Name: "repeated_Message",
@@ -813,6 +846,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.MessageKind,
JSONName: "repeatedMessage",
+ IsPacked: prototype.False,
},
{
Name: "map_int32_int64",
@@ -820,6 +854,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.MessageKind,
JSONName: "mapInt32Int64",
+ IsPacked: prototype.False,
},
{
Name: "map_string_message",
@@ -827,6 +862,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.MessageKind,
JSONName: "mapStringMessage",
+ IsPacked: prototype.False,
},
{
Name: "map_fixed64_enum",
@@ -834,6 +870,7 @@
Cardinality: protoreflect.Repeated,
Kind: protoreflect.MessageKind,
JSONName: "mapFixed64Enum",
+ IsPacked: prototype.False,
},
},
},
@@ -846,6 +883,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Int32Kind,
JSONName: "key",
+ IsPacked: prototype.False,
},
{
Name: "value",
@@ -853,8 +891,10 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Int64Kind,
JSONName: "value",
+ IsPacked: prototype.False,
},
},
+ IsMapEntry: true,
},
{
Name: "MapStringMessageEntry",
@@ -865,6 +905,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.StringKind,
JSONName: "key",
+ IsPacked: prototype.False,
},
{
Name: "value",
@@ -872,8 +913,10 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.MessageKind,
JSONName: "value",
+ IsPacked: prototype.False,
},
},
+ IsMapEntry: true,
},
{
Name: "MapFixed64EnumEntry",
@@ -884,6 +927,7 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.Fixed64Kind,
JSONName: "key",
+ IsPacked: prototype.False,
},
{
Name: "value",
@@ -891,8 +935,10 @@
Cardinality: protoreflect.Optional,
Kind: protoreflect.EnumKind,
JSONName: "value",
+ IsPacked: prototype.False,
},
},
+ IsMapEntry: true,
},
{
Name: "Message",