Skip to content

Commit

Permalink
fix generator build layering by correcting deps
Browse files Browse the repository at this point in the history
Added some missing deps on protobuf compiler, io, and some absl string
libraries. Also removed some porting related definitions that are
internal to protobuf.
  • Loading branch information
dibenede committed Jul 15, 2024
1 parent fd8f7f7 commit dae06f2
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 153 deletions.
7 changes: 7 additions & 0 deletions generator/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ cc_binary(
visibility = ["//visibility:public"],
deps = [
"@com_google_protobuf//:protobuf",
"@com_google_protobuf//src/google/protobuf/compiler:code_generator",
"@com_google_protobuf//src/google/protobuf/io",
"@com_google_protobuf//src/google/protobuf/io:printer",
"@com_google_protobuf//src/google/protobuf/io:tokenizer",
"@com_google_protobuf//:protoc_lib",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
],
)


2 changes: 0 additions & 2 deletions generator/js_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/strtod.h>
#include <google/protobuf/io/zero_copy_stream.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/descriptor_legacy.h>
#include "absl/strings/escaping.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
Expand Down
7 changes: 1 addition & 6 deletions generator/js_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@
#include <set>
#include <string>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/compiler/scc.h>
#include <google/protobuf/compiler/code_generator.h>

#include <google/protobuf/port_def.inc>

namespace google {
namespace protobuf {

Expand Down Expand Up @@ -133,7 +130,7 @@ struct GeneratorOptions {
// header. If you create your own protocol compiler binary and you want it to
// support JavaScript output, you can do so by registering an instance of this
// CodeGenerator with the CommandLineInterface in your main() function.
class PROTOC_EXPORT Generator : public CodeGenerator {
class Generator : public CodeGenerator {
public:
Generator() {}
virtual ~Generator() {}
Expand Down Expand Up @@ -331,6 +328,4 @@ class PROTOC_EXPORT Generator : public CodeGenerator {
} // namespace protobuf
} // namespace google

#include <google/protobuf/port_undef.inc>

#endif // GOOGLE_PROTOBUF_COMPILER_JS_GENERATOR_H__
Loading

0 comments on commit dae06f2

Please sign in to comment.