Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions generator/js_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -430,20 +430,12 @@ std::string GetEnumFileName(const GeneratorOptions& options,
// Returns the message/response ID, if set.
std::string GetMessageId(const Descriptor* desc) { return std::string(); }

bool IgnoreExtensionField(const FieldDescriptor* field) {
// Exclude descriptor extensions from output "to avoid clutter" (from original
// codegen).
if (!field->is_extension()) return false;
const FileDescriptor* file = field->containing_type()->file();
return file->name() == "net/proto2/proto/descriptor.proto" ||
file->name() == "google/protobuf/descriptor.proto";
}

// Used inside Google only -- do not remove.
bool IsResponse(const Descriptor* desc) { return false; }

bool IgnoreField(const FieldDescriptor* field) {
return IgnoreExtensionField(field);
// no-op in open source
return false;
}

// Do we ignore this message type?
Expand Down
1 change: 1 addition & 0 deletions jasmine.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"google/protobuf/any.js",
"google/protobuf/struct.js",
"google/protobuf/timestamp.js",
"google/protobuf/descriptor.js",
"testproto_libs1.js",
"testproto_libs2.js"
]
Expand Down