Skip to content

Commit

Permalink
fix some type errors about file descriptor set
Browse files Browse the repository at this point in the history
  • Loading branch information
disjukr committed Oct 16, 2023
1 parent 76cecbe commit 0683570
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions cli/pb/cmds/gen/cmds/protoc-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default new Command()
),
protoFile: topo(fileDescriptorSet.file),
parameter: options.option,
sourceFileDescriptors: [], // TODO
};
await writeAll(plugin.stdin, encodeCodeGeneratorRequest(request));
plugin.stdin.close();
Expand Down
10 changes: 9 additions & 1 deletion compat/protoc/file-descriptor-set/pbkit2fds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ function fileDescriptorOptions(
phpMetadataNamespace: options["php_metadata_namespace"]?.toString(),
rubyPackage: options["ruby_package"]?.toString(),
optimizeFor: getOptimizeMode(options["optimize_for"]),
features: {}, // TODO
uninterpretedOption: [], // TODO
};
return result;
Expand All @@ -471,6 +472,7 @@ function methodDescriptorOptions(
> = {
deprecated: booleanOptionValue(options["deprecated"]),
idempotencyLevel: getIdempotencyLevel(options["idempotency_level"]),
features: {}, // TODO
uninterpretedOption: [], // TODO
};
return result;
Expand Down Expand Up @@ -502,7 +504,9 @@ function fieldDescriptorOptions(
jstype: getJSType(options["jstype"]),
debugRedact: booleanOptionValue(options["debug_redact"]),
retention: getOptionRetention(options["retention"]),
target: getOptionTargetType(options["target"]),
targets: [], // TODO
editionDefaults: [], // TODO
features: {}, // TODO
uninterpretedOption: [], // TODO
};
return result;
Expand Down Expand Up @@ -567,6 +571,7 @@ function enumDescriptorOptions(
allowAlias: booleanOptionValue(options["allow_alias"]),
deprecated: booleanOptionValue(options["deprecated"]),
deprecatedLegacyJsonFieldConflicts: undefined,
features: {}, // TODO
uninterpretedOption: [], // TODO
};
return result;
Expand All @@ -577,6 +582,8 @@ function enumValueOptions(
): RequiredOptional<EnumValueOptions> {
const result: RequiredOptional<EnumValueOptions> = {
deprecated: booleanOptionValue(options["deprecated"]),
features: {}, // TODO
debugRedact: undefined,
uninterpretedOption: [], // TODO
};
return result;
Expand All @@ -597,6 +604,7 @@ function descriptorOptions(
deprecatedLegacyJsonFieldConflicts: booleanOptionValue(
options["deprecated_legacy_json_field_conflicts"],
),
features: {}, // TODO
uninterpretedOption: [], // TODO
};
return result;
Expand Down

0 comments on commit 0683570

Please sign in to comment.