Skip to content

Commit e5234fe

Browse files
authored
Follow-ups to RecordPreparer: faster Timestamps, shared generated names, imported message zero values (#1472)
## Summary Follow-ups to `RecordPreparer` from #1442, proposed as a stacked PR. ```diff build_scalar_preparer + Timestamp field whose scalar uses the DateTime preparer + Time.at(seconds, nanos, :nsec).iso8601(DATE_TIME_PRECISION) other message scalar - preparer(JSON.parse(encode_json(value))) + preparer(JSON.parse(encode_json(value, emit_defaults: true))) build_enum - {symbol => name, number => name} + {symbol => name} schema generator and RecordPreparer - "value", "values", zero value name minus "_UNSPECIFIED" + ProtoConversions::ABSTRACT_TYPE_ONEOF_NAME, LIST_WRAPPER_VALUES_FIELD_NAME, enum_value_prefix(name) ``` - **Timestamps:** most of the cost per `Timestamp` was `IndexingPreparers::DateTime` re-parsing an ISO 8601 string. The direct format gives the same output: it truncates to milliseconds and handles negative `seconds`. - **Imported message scalars:** the canonical protobuf JSON form omits zero-valued fields. For example, a `geo_point` scalar with `lat: 0` was indexed as `{"lon" => 5.5}`. - **Enum numbers:** decoded messages return known enum values as symbols on MRI and on JRuby. Only a JRuby `RepeatedField#push(0)` keeps a number, and only the spec did that. - **Shared names:** the generator and `RecordPreparer` now use the same constants for the names that the generator emits. `ProtoPublisher` keeps its own derivation, so it stays an independent check. ## Evidence - **Before:** the new imported-message spec failed: `expected {"location" => {"lat" => 0.0, "lon" => 5.5}}, got {"location" => {"lon" => 5.5}}`. **After:** it passes. - No existing spec failed under these broken implementations. Each now fails a new spec: - The `Timestamp` shortcut ignores the scalar's preparer. - The shortcut rounds instead of truncating, or computes with a `Float`. - Treat every message outside `google.protobuf` as an object type. - List recursion drops the nested mapping below the first list level. - Presence methods use snake_case names. - A field named `value` marks a type as abstract. - **Benchmark:** for one `Timestamp` value on MRI 4.0, preparation takes 2.0 µs on the JSON path and 0.4 µs on the direct format. ## Merge Danger **Door:** two-way **Blast Radius:** `elasticgraph-proto_ingestion`. The only effect outside it is a new optional `proto_paths:` argument on `SpecSupport::ProtoPublisher`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 2684bc8 commit e5234fe

9 files changed

Lines changed: 158 additions & 32 deletions

File tree

‎elasticgraph-proto_ingestion/lib/elastic_graph/proto_ingestion/proto_conversions.rb‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,29 @@
66
#
77
# frozen_string_literal: true
88

9+
require "elastic_graph/support/casing"
10+
911
module ElasticGraph
1012
module ProtoIngestion
11-
# Shared conversions between protobuf names and ElasticGraph names.
13+
# Shared conversions between protobuf names and ElasticGraph names. The schema generator and the code
14+
# that reads protobuf messages both use these, so that a change to a generated name changes both.
1215
#
1316
# @private
1417
module ProtoConversions
18+
# The name of the `oneof` through which a message for an abstract type holds its concrete subtype.
19+
ABSTRACT_TYPE_ONEOF_NAME = "value"
20+
21+
# The name of the repeated field in each message that wraps an inner list of a nested list.
22+
LIST_WRAPPER_VALUES_FIELD_NAME = "values"
23+
24+
# Returns the prefix that the protobuf values of the named enum type start with.
25+
#
26+
# @param enum_type_name [String] name of the ElasticGraph enum type
27+
# @return [String]
28+
def self.enum_value_prefix(enum_type_name)
29+
Support::Casing.to_upper_snake(enum_type_name)
30+
end
31+
1532
# Recovers a standard ElasticGraph enum value name by removing its enum's prefix.
1633
# Non-standard names must be looked up in runtime metadata instead.
1734
#

‎elasticgraph-proto_ingestion/lib/elastic_graph/proto_ingestion/record_preparer.rb‎

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#
77
# frozen_string_literal: true
88

9+
require "elastic_graph/constants"
10+
require "elastic_graph/indexer/indexing_preparers/date_time"
911
require "elastic_graph/proto_ingestion"
1012
require "elastic_graph/proto_ingestion/proto_conversions"
1113
require "elastic_graph/proto_ingestion/runtime_metadata/schema"
@@ -24,7 +26,7 @@ def initialize(schema_artifacts)
2426
@metadata = RuntimeMetadata::Schema.from_schema_artifacts(schema_artifacts)
2527
@scalar_types_by_name = schema_artifacts.runtime_metadata.scalar_types_by_name
2628
@types = Support::ThreadSafeCache.new # : Support::ThreadSafeCache[::Class, typePlan]
27-
@enums = Support::ThreadSafeCache.new # : Support::ThreadSafeCache[::Google::Protobuf::EnumDescriptor, ::Hash[::Symbol | ::Integer, ::String?]]
29+
@enums = Support::ThreadSafeCache.new # : Support::ThreadSafeCache[::Google::Protobuf::EnumDescriptor, ::Hash[::Symbol, ::String?]]
2830
end
2931

3032
# Implements the indexer's record-preparer interface without an intermediate public record hash.
@@ -62,7 +64,7 @@ def prepare(message, mapping_properties)
6264
# @implements AbstractType
6365

6466
def prepare(message, mapping_properties)
65-
alternative = message.value
67+
alternative = message.public_send(ProtoConversions::ABSTRACT_TYPE_ONEOF_NAME)
6668
return nil unless alternative
6769

6870
types_by_alternative.fetch(alternative).prepare(message.public_send(alternative), mapping_properties)
@@ -86,7 +88,7 @@ def prepare_into(prepared, message, mapping_properties)
8688
def prepare_value(value, nested_mapping, depth)
8789
if depth > 0
8890
return value.map do |item|
89-
prepare_value((depth > 1) ? item.values : item, nested_mapping, depth - 1)
91+
prepare_value((depth > 1) ? item[ProtoConversions::LIST_WRAPPER_VALUES_FIELD_NAME] : item, nested_mapping, depth - 1)
9092
end
9193
end
9294

@@ -105,7 +107,7 @@ def resolve_type(descriptor)
105107
end
106108

107109
def build_type(descriptor)
108-
if (oneof = descriptor.lookup_oneof("value"))
110+
if (oneof = descriptor.lookup_oneof(ProtoConversions::ABSTRACT_TYPE_ONEOF_NAME))
109111
types_by_alternative = {} # : ::Hash[::Symbol, Type | AbstractType]
110112
oneof.each do |field|
111113
subtype = field.subtype # : ::Google::Protobuf::Descriptor
@@ -138,7 +140,7 @@ def build_field(descriptor, field, field_meta)
138140
wrapper = leaf.subtype # : ::Google::Protobuf::Descriptor
139141
break unless wrapper.name.start_with?("#{descriptor.name}.")
140142

141-
leaf = wrapper.lookup("values") # : ::Google::Protobuf::FieldDescriptor
143+
leaf = wrapper.lookup(ProtoConversions::LIST_WRAPPER_VALUES_FIELD_NAME) # : ::Google::Protobuf::FieldDescriptor
142144
end
143145

144146
case leaf.type
@@ -166,17 +168,12 @@ def build_enum(descriptor)
166168
name = type_name_for(descriptor)
167169
overrides = @metadata.types_by_name[name]&.non_standard_enum_values_by_name || {}
168170
entries = descriptor.to_h
169-
prefix = entries.key(0).to_s.delete_suffix("_UNSPECIFIED")
170-
values = {} # : ::Hash[::Symbol | ::Integer, ::String?]
171+
prefix = ProtoConversions.enum_value_prefix(name)
171172

172-
entries.each do |symbol, number|
173+
entries.to_h do |symbol, number|
173174
key = symbol.to_s
174-
value = (number == 0) ? nil : (overrides[key] || ProtoConversions.enum_value_to_eg_name(key, prefix))
175-
# JRuby can expose repeated enum values as numbers rather than symbols.
176-
values[symbol] = values[number] = value
175+
[symbol, (number == 0) ? nil : (overrides[key] || ProtoConversions.enum_value_to_eg_name(key, prefix))]
177176
end
178-
179-
values
180177
end
181178
end
182179

@@ -189,9 +186,13 @@ def build_scalar_preparer(leaf_field, field_meta, message_descriptor: nil)
189186
type_name ||= DEFAULT_SCALARS_BY_PROTO_TYPE.fetch(proto_type)
190187
preparer = @scalar_types_by_name.fetch(type_name).load_indexing_preparer.extension_class # : singleton(SchemaArtifacts::RuntimeMetadata::ScalarIndexingPreparerInterface)
191188

192-
if message_descriptor
193-
# Message scalars (such as `google.protobuf.Timestamp`) are prepared from their canonical protobuf JSON form.
194-
->(value) { preparer.prepare_for_indexing(::JSON.parse(::Google::Protobuf.encode_json(value))) }
189+
if message_descriptor&.name == "google.protobuf.Timestamp" && preparer == Indexer::IndexingPreparers::DateTime
190+
# Produces what `IndexingPreparers::DateTime` would, without formatting and then re-parsing an ISO 8601 string.
191+
->(value) { ::Time.at(value.seconds, value.nanos, :nsec, in: "UTC").iso8601(DATE_TIME_PRECISION) }
192+
elsif message_descriptor
193+
# Message scalars (such as `google.protobuf.Duration`) are prepared from their protobuf JSON form.
194+
# `emit_defaults` keeps zero-valued fields, which the canonical form omits.
195+
->(value) { preparer.prepare_for_indexing(::JSON.parse(::Google::Protobuf.encode_json(value, emit_defaults: true))) }
195196
elsif scalar == "Untyped"
196197
->(value) { preparer.prepare_for_indexing(::JSON.parse(value)) }
197198
else

‎elasticgraph-proto_ingestion/lib/elastic_graph/proto_ingestion/schema_definition/schema_elements/enum_type_extension.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def protobuf_field_comment
8888
#
8989
# @return [String]
9090
def proto_enum_value_prefix
91-
@proto_enum_value_prefix ||= Support::Casing.to_upper_snake(name)
91+
@proto_enum_value_prefix ||= ProtoConversions.enum_value_prefix(name)
9292
end
9393

9494
# Returns names that removing the protobuf enum value prefix cannot recover.

‎elasticgraph-proto_ingestion/lib/elastic_graph/proto_ingestion/schema_definition/schema_elements/object_interface_and_union_extension.rb‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# frozen_string_literal: true
88

99
require "elastic_graph/errors"
10+
require "elastic_graph/proto_ingestion/proto_conversions"
1011
require "elastic_graph/proto_ingestion/runtime_metadata/type"
1112
require "elastic_graph/proto_ingestion/schema_definition/schema_elements/proto_documentation"
1213
require "elastic_graph/support/casing"
@@ -154,7 +155,7 @@ def render_proto_oneof(schema, message_name, package_name)
154155
)
155156
" #{proto_subtype.proto_type_reference(package_name)} #{field_name} = #{field_number};"
156157
end
157-
body_lines = [" oneof value {", *alternatives, " }"]
158+
body_lines = [" oneof #{ProtoConversions::ABSTRACT_TYPE_ONEOF_NAME} {", *alternatives, " }"]
158159
schema.reserved_field_numbers_for(message_name, active_field_names).each do |field_name, field_number|
159160
body_lines << " reserved #{field_number}; // Previously used by #{field_name}."
160161
end
@@ -211,7 +212,7 @@ def proto_list_wrapper_definitions(package_name)
211212
end
212213
[
213214
" message #{proto_list_wrapper_name(schema_field.name, level, depth)} {",
214-
" repeated #{element_type} values = 1;",
215+
" repeated #{element_type} #{ProtoConversions::LIST_WRAPPER_VALUES_FIELD_NAME} = 1;",
215216
" }"
216217
].join("\n")
217218
end

‎elasticgraph-proto_ingestion/sig/elastic_graph/proto_ingestion/proto_conversions.rbs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
module ElasticGraph
22
module ProtoIngestion
33
module ProtoConversions
4+
ABSTRACT_TYPE_ONEOF_NAME: "value"
5+
LIST_WRAPPER_VALUES_FIELD_NAME: "values"
6+
def self.enum_value_prefix: (::String enum_type_name) -> ::String
47
def self.enum_value_to_eg_name: (::String proto_name, ::String enum_value_prefix) -> ::String
58
end
69
end

‎elasticgraph-proto_ingestion/sig/elastic_graph/proto_ingestion/record_preparer.rbs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module ElasticGraph
66
@metadata: RuntimeMetadata::Schema
77
@scalar_types_by_name: ::Hash[::String, SchemaArtifacts::RuntimeMetadata::ScalarType]
88
@types: Support::ThreadSafeCache[::Class, typePlan]
9-
@enums: Support::ThreadSafeCache[::Google::Protobuf::EnumDescriptor, ::Hash[::Symbol | ::Integer, ::String?]]
9+
@enums: Support::ThreadSafeCache[::Google::Protobuf::EnumDescriptor, ::Hash[::Symbol, ::String?]]
1010

1111
def initialize: (schemaArtifacts) -> void
1212
def prepare_for_index: (::String, untyped, ::Hash[::String, untyped]?) -> ::Hash[::String, untyped]?
@@ -44,7 +44,7 @@ module ElasticGraph
4444
def resolve_type: (::Google::Protobuf::Descriptor) -> typePlan
4545
def build_type: (::Google::Protobuf::Descriptor) -> typePlan
4646
def build_field: (::Google::Protobuf::Descriptor, ::Google::Protobuf::FieldDescriptor, RuntimeMetadata::Field?) -> Field
47-
def build_enum: (::Google::Protobuf::EnumDescriptor) -> ::Hash[::Symbol | ::Integer, ::String?]
47+
def build_enum: (::Google::Protobuf::EnumDescriptor) -> ::Hash[::Symbol, ::String?]
4848
def build_scalar_preparer: (
4949
::Google::Protobuf::FieldDescriptor,
5050
RuntimeMetadata::Field?,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2024 - 2026 Block, Inc.
2+
//
3+
// Use of this source code is governed by an MIT-style
4+
// license that can be found in the LICENSE file or at
5+
// https://opensource.org/licenses/MIT.
6+
7+
// External message type for the `RecordPreparer` spec on scalars backed by an imported message.
8+
9+
syntax = "proto3";
10+
package geo;
11+
12+
message Coordinates {
13+
double lat = 1;
14+
double lon = 2;
15+
}

‎elasticgraph-proto_ingestion/spec/integration/elastic_graph/proto_ingestion/record_preparer_spec.rb‎

Lines changed: 92 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,46 @@ module ProtoIngestion
5252
expect(prepare(native)).to eq(empty_lists.merge("grid" => [[[0, 2], []], []]))
5353
end
5454

55+
# Each of these depends on a descriptor convention of the schema generator that the shared schema does not exercise:
56+
# list wrappers around objects and abstract types, presence methods for camelCase names, and a concrete type
57+
# field that has the name of the `oneof` that marks an abstract type.
58+
it "prepares nested lists of objects and abstract types, lists of message scalars, camelCase fields, and a field named `value`" do
59+
artifacts = define_proto_schema_results do |schema|
60+
schema.proto_schema_artifacts package_name: "preparation"
61+
schema.object_type("Box") { |type| type.field "width", "Int" }
62+
schema.object_type("Ball") { |type| type.field "radius", "Float" }
63+
schema.union_type("Shape") { |type| type.subtypes "Box", "Ball" }
64+
schema.object_type("Reading") { |type| type.field "value", "Int" }
65+
66+
schema.object_type "Event" do |type|
67+
type.field "id", "ID!"
68+
type.field "createdAt", "DateTime"
69+
type.field "times", "[DateTime!]"
70+
type.field("readingGrid", "[[Reading!]!]") { |field| field.mapping type: "object" }
71+
type.field("shapeGrid", "[[Shape!]!]") { |field| field.mapping type: "object" }
72+
type.index "events"
73+
end
74+
end
75+
native = native_record(
76+
{
77+
"createdAt" => "2024-02-29T12:34:56.123456789Z",
78+
"times" => ["2024-02-29T12:34:56Z"],
79+
"readingGrid" => [[{"value" => 3}], []],
80+
"shapeGrid" => [[{"__typename" => "Ball", "radius" => 1.5}]]
81+
},
82+
type: "Event",
83+
via: SpecSupport::ProtoPublisher.new(artifacts)
84+
)
85+
mapping = {"shapeGrid" => {"properties" => {"__typename" => {"type" => "keyword"}}}}
86+
87+
expect(prepare(native, type: "Event", mapping: mapping, via: described_class.new(artifacts))).to eq(
88+
"createdAt" => "2024-02-29T12:34:56.123Z",
89+
"times" => ["2024-02-29T12:34:56.000Z"],
90+
"readingGrid" => [[{"value" => 3}], []],
91+
"shapeGrid" => [[{"__typename" => "Ball", "radius" => 1.5}]]
92+
)
93+
end
94+
5595
it "prepares an abstract-typed field from the fields of its concrete subtype" do
5696
native = native_record({"shape" => {"__typename" => "Box", "width" => 0}})
5797

@@ -101,19 +141,46 @@ module ProtoIngestion
101141
expect(prepare(native)).to eq(empty_lists.merge("state" => "onHold", "states" => ["ACTIVE", "onHold"], "kind" => "SPECIAL"))
102142
end
103143

144+
# Published records never set the zero value (`nil` is left unset), so this example sets it directly.
104145
it "prepares the zero (unspecified) enum value as `nil`" do
105146
native = native_record do |record|
106-
record.state = 0
107-
record.states.push(0)
147+
record.state = :STATE_UNSPECIFIED
148+
record.states.push(:STATE_UNSPECIFIED)
108149
end
109150

110151
expect(prepare(native)).to eq(empty_lists.merge("state" => nil, "states" => [nil]))
111152
end
112153

113-
it "formats `DateTime` values with millisecond precision" do
114-
native = native_record({"at" => "2024-02-29T12:34:56.123456789Z"})
154+
# Truncates (not rounds) sub-millisecond digits, including before 1970, where protobuf stores negative `seconds`.
155+
[
156+
["2024-02-29T12:34:56.123456789Z", "2024-02-29T12:34:56.123Z"],
157+
["2024-02-29T12:34:56.999999999Z", "2024-02-29T12:34:56.999Z"],
158+
["1969-12-31T23:59:59.999999999Z", "1969-12-31T23:59:59.999Z"]
159+
].each do |published, indexed|
160+
it "formats the `DateTime` value #{published} with millisecond precision as #{indexed}" do
161+
native = native_record({"at" => published})
115162

116-
expect(prepare(native)).to eq(empty_lists.merge("at" => "2024-02-29T12:34:56.123Z"))
163+
expect(prepare(native)).to eq(empty_lists.merge("at" => indexed))
164+
end
165+
end
166+
167+
it "prepares a `google.protobuf.Timestamp` scalar that lacks `DateTime` indexing preparation from its JSON form" do
168+
artifacts = define_proto_schema_results do |schema|
169+
schema.proto_schema_artifacts package_name: "preparation"
170+
schema.scalar_type("Instant") do |type|
171+
type.mapping type: "keyword"
172+
type.protobuf type: "google.protobuf.Timestamp", import: "google/protobuf/timestamp.proto"
173+
end
174+
175+
schema.object_type "Event" do |type|
176+
type.field "id", "ID!"
177+
type.field "at", "Instant"
178+
type.index "events"
179+
end
180+
end
181+
native = native_record({"at" => "2024-02-29T12:34:56.123456789Z"}, type: "Event", via: SpecSupport::ProtoPublisher.new(artifacts))
182+
183+
expect(prepare(native, type: "Event", via: described_class.new(artifacts))).to eq("at" => "2024-02-29T12:34:56.123456789Z")
117184
end
118185

119186
it "prepares other external message scalars using their scalar's indexing preparation" do
@@ -122,6 +189,26 @@ module ProtoIngestion
122189
expect(prepare(native)).to eq(empty_lists.merge("duration" => "30.500s"))
123190
end
124191

192+
it "prepares a scalar backed by an imported message, outside both `google.protobuf` and the schema's package, as its JSON form with zero values kept" do
193+
artifacts = define_proto_schema_results do |schema|
194+
schema.proto_schema_artifacts package_name: "preparation"
195+
schema.scalar_type("Coordinates") do |type|
196+
type.mapping type: "geo_point"
197+
type.protobuf type: "geo.Coordinates", import: "geo/coordinates.proto"
198+
end
199+
200+
schema.object_type "Place" do |type|
201+
type.field "id", "ID!"
202+
type.field "location", "Coordinates"
203+
type.index "places"
204+
end
205+
end
206+
publisher = SpecSupport::ProtoPublisher.new(artifacts, proto_paths: [::File.expand_path("../../../fixtures/proto", __dir__)])
207+
native = native_record({"location" => {"lat" => 0.0, "lon" => 5.5}}, type: "Place", via: publisher)
208+
209+
expect(prepare(native, type: "Place", via: described_class.new(artifacts))).to eq("location" => {"lat" => 0.0, "lon" => 5.5})
210+
end
211+
125212
it "prepares `DateTime` values overridden to `string` using `DateTime` indexing preparation" do
126213
artifacts = define_proto_schema_results do |schema|
127214
schema.proto_schema_artifacts package_name: "preparation"

‎spec_support/lib/elastic_graph/spec_support/proto_publisher.rb‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,19 @@ class ProtoPublisher
2222
# so we cache the compiled descriptors by schema source to run `protoc` only once per unique schema.
2323
@descriptor_files_by_source = {}
2424

25-
def self.descriptor_files_for(source)
26-
@descriptor_files_by_source[source] ||= ::Dir.mktmpdir("elasticgraph-proto") do |directory|
25+
# `proto_paths` are directories that hold the `.proto` files that `schema.proto` imports, beyond those
26+
# that `protoc` bundles (such as `google/protobuf/timestamp.proto`).
27+
def self.descriptor_files_for(source, proto_paths = [])
28+
@descriptor_files_by_source[[source, proto_paths]] ||= ::Dir.mktmpdir("elasticgraph-proto") do |directory|
2729
::File.write(::File.join(directory, "schema.proto"), source)
2830
path = ::File.join(directory, "schema.pb")
29-
output, status = ::Open3.capture2e(Protoc::PROTOC_BINARY, "--proto_path=#{directory}", "--include_imports", "--descriptor_set_out=#{path}", "schema.proto", chdir: directory)
31+
output, status = ::Open3.capture2e(Protoc::PROTOC_BINARY, "--proto_path=#{directory}", *proto_paths.map { |path| "--proto_path=#{path}" }, "--include_imports", "--descriptor_set_out=#{path}", "schema.proto", chdir: directory)
3032
raise output unless status.success?
3133
::Google::Protobuf::FileDescriptorSet.decode(::File.binread(path)).file.to_a
3234
end
3335
end
3436

35-
def initialize(schema_artifacts)
37+
def initialize(schema_artifacts, proto_paths: [])
3638
@metadata = ProtoIngestion::RuntimeMetadata::Schema.from_schema_artifacts(schema_artifacts)
3739
@pool = ::Google::Protobuf::DescriptorPool.new
3840
source = if schema_artifacts.respond_to?(:proto_schema)
@@ -41,7 +43,7 @@ def initialize(schema_artifacts)
4143
::File.read(::File.join(schema_artifacts.artifacts_dir, "schema.proto"))
4244
end
4345

44-
files = ProtoPublisher.descriptor_files_for(source)
46+
files = ProtoPublisher.descriptor_files_for(source, proto_paths)
4547
files.each do |file|
4648
@pool.add_serialized_file(::Google::Protobuf::FileDescriptorProto.encode(file))
4749
end

0 commit comments

Comments
 (0)