8000 fix generator build layering by correcting deps · tronsuper/protobuf-javascript@dae06f2 · GitHub
[go: up one dir, main page]

Skip to content

Commit dae06f2

Browse files
committed
fix generator build layering by correcting deps
Added some missing deps on protobuf compiler, io, and some absl string libraries. Also removed some porting related definitions that are internal to protobuf.
1 parent fd8f7f7 commit dae06f2

File tree

4 files changed

+133
-153
lines changed

4 files changed

+133
-153
lines changed

generator/BUILD.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ cc_binary(
1010
visibility = ["//visibility:public"],
1111
deps = [
1212
"@com_google_protobuf//:protobuf",
13+
"@com_google_protobuf//src/google/protobuf/compiler:code_generator",
14+
"@com_google_protobuf//src/google/protobuf/io",
15+
"@com_google_protobuf//src/google/protobuf/io:printer",
16+
"@com_google_protobuf//src/google/protobuf/io:tokenizer",
1317
"@com_google_protobuf//:protoc_lib",
18+
"@com_google_absl//absl/strings",
19+
"@com_google_absl//absl/strings:str_format",
1420
],
1521
)
1622

23+

generator/js_generator.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
#include <google/protobuf/io/printer.h>
3737
#include <google/protobuf/io/strtod.h>
3838
#include <google/protobuf/io/zero_copy_stream.h>
39-
#include <google/protobuf/stubs/common.h>
40-
#include <google/protobuf/descriptor_legacy.h>
4139
#include "absl/strings/escaping.h"
4240
#include "absl/strings/str_cat.h"
4341
#include "absl/strings/str_format.h"

generator/js_generator.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@
3636
#include <set>
3737
#include <string>
3838

39-
#include <google/protobuf/stubs/common.h>
4039
#include <google/protobuf/compiler/scc.h>
4140
#include <google/protobuf/compiler/code_generator.h>
4241

43-
#include <google/protobuf/port_def.inc>
44-
4542
namespace google {
4643
namespace protobuf {
4744

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

334-
#include <google/protobuf/port_undef.inc>
335-
336331
#endif // GOOGLE_PROTOBUF_COMPILER_JS_GENERATOR_H__

0 commit comments

Comments
 (0)
0