|
|
|
@ -467,8 +467,6 @@ void EndPackageModules(int levels, io::Printer* printer) { |
|
|
|
|
|
|
|
|
|
bool GenerateDslDescriptor(const FileDescriptor* file, io::Printer* printer, |
|
|
|
|
std::string* error) { |
|
|
|
|
printer->Print( |
|
|
|
|
"require 'google/protobuf'\n\n"); |
|
|
|
|
printer->Print("Google::Protobuf::DescriptorPool.generated_pool.build do\n"); |
|
|
|
|
printer->Indent(); |
|
|
|
|
printer->Print("add_file(\"$filename$\", :syntax => :$syntax$) do\n", |
|
|
|
@ -509,8 +507,13 @@ bool GenerateFile(const FileDescriptor* file, io::Printer* printer, |
|
|
|
|
"\n", |
|
|
|
|
"filename", file->name()); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < file->dependency_count(); i++) { |
|
|
|
|
printer->Print("require '$name$'\n", "name", GetRequireName(file->dependency(i)->name())); |
|
|
|
|
printer->Print("require 'google/protobuf'\n\n"); |
|
|
|
|
|
|
|
|
|
if (file->dependency_count() != 0) { |
|
|
|
|
for (int i = 0; i < file->dependency_count(); i++) { |
|
|
|
|
printer->Print("require '$name$'\n", "name", GetRequireName(file->dependency(i)->name())); |
|
|
|
|
} |
|
|
|
|
printer->Print("\n"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TODO: Remove this when ruby supports extensions for proto2 syntax.
|
|
|
|
|