Skip to content

Commit 3a2af35

Browse files
mkruskal-googlecopybara-github
authored andcommitted
Breaking change: make generator headers private
#test-continuous These built-in generators are exposed in the protoc binary we release. Using them as libraries would typically be done by someone creating a custom build of protoc mixing our generators with their own. The supported alternative would be to build your generator as a plugin binary, and use it with the normal protoc binary. PiperOrigin-RevId: 857982672
1 parent db63534 commit 3a2af35

File tree

9 files changed

+0
-111
lines changed

9 files changed

+0
-111
lines changed

cmake/installed_include_golden.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ google/protobuf/arenaz_sampler.h
1212
google/protobuf/compiler/code_generator.h
1313
google/protobuf/compiler/code_generator_lite.h
1414
google/protobuf/compiler/command_line_interface.h
15-
google/protobuf/compiler/cpp/generator.h
1615
google/protobuf/compiler/cpp/helpers.h
1716
google/protobuf/compiler/cpp/names.h
1817
google/protobuf/compiler/cpp/options.h
19-
google/protobuf/compiler/csharp/csharp_generator.h
2018
google/protobuf/compiler/csharp/names.h
2119
google/protobuf/compiler/importer.h
2220
google/protobuf/compiler/java/doc_comment.h
@@ -26,22 +24,16 @@ google/protobuf/compiler/java/java_features.pb.h
2624
google/protobuf/compiler/java/name_resolver.h
2725
google/protobuf/compiler/java/names.h
2826
google/protobuf/compiler/java/options.h
29-
google/protobuf/compiler/kotlin/generator.h
3027
google/protobuf/compiler/notices.h
31-
google/protobuf/compiler/objectivec/generator.h
3228
google/protobuf/compiler/objectivec/line_consumer.h
3329
google/protobuf/compiler/objectivec/names.h
3430
google/protobuf/compiler/objectivec/nsobject_methods.h
3531
google/protobuf/compiler/parser.h
3632
google/protobuf/compiler/php/names.h
37-
google/protobuf/compiler/php/php_generator.h
3833
google/protobuf/compiler/plugin.h
3934
google/protobuf/compiler/plugin.pb.h
4035
google/protobuf/compiler/plugin.proto
41-
google/protobuf/compiler/python/generator.h
42-
google/protobuf/compiler/python/pyi_generator.h
4336
google/protobuf/compiler/retention.h
44-
google/protobuf/compiler/ruby/ruby_generator.h
4537
google/protobuf/compiler/scc.h
4638
google/protobuf/compiler/subprocess.h
4739
google/protobuf/compiler/versions.h

pkg/BUILD.bazel

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,6 @@ cc_dist_library(
229229
"//src/google/protobuf/compiler/java:names",
230230
"//src/google/protobuf/compiler/objectivec:names",
231231
"//src/google/protobuf/compiler/php:names",
232-
# TODO Make these private in the next breaking C++ release.
233-
"//src/google/protobuf/compiler/cpp:generator_headers",
234-
"//src/google/protobuf/compiler/csharp:generator_headers",
235-
"//src/google/protobuf/compiler/java:generator_headers",
236-
"//src/google/protobuf/compiler/kotlin:generator_headers",
237-
"//src/google/protobuf/compiler/objectivec:generator_headers",
238-
"//src/google/protobuf/compiler/php:php_generator",
239-
"//src/google/protobuf/compiler/python:generator_headers",
240-
"//src/google/protobuf/compiler/ruby:generator_headers",
241232
],
242233
)
243234

src/google/protobuf/compiler/cpp/BUILD.bazel

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,6 @@ cc_library(
3333
],
3434
)
3535

36-
cc_library(
37-
name = "generator_headers",
38-
hdrs = ["generator.h"],
39-
copts = COPTS,
40-
strip_include_prefix = "/src",
41-
visibility = ["//pkg:__pkg__"],
42-
deps = [
43-
"//src/google/protobuf",
44-
"//src/google/protobuf/compiler:code_generator",
45-
"@abseil-cpp//absl/status",
46-
"@abseil-cpp//absl/strings",
47-
],
48-
)
49-
5036
cc_library(
5137
name = "names_internal",
5238
srcs = [

src/google/protobuf/compiler/csharp/BUILD.bazel

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@ cc_library(
2020
],
2121
)
2222

23-
cc_library(
24-
name = "generator_headers",
25-
hdrs = ["csharp_generator.h"],
26-
copts = COPTS,
27-
strip_include_prefix = "/src",
28-
visibility = ["//pkg:__pkg__"],
29-
deps = [
30-
"//src/google/protobuf",
31-
"//src/google/protobuf/compiler:code_generator",
32-
],
33-
)
34-
3523
cc_library(
3624
name = "csharp",
3725
srcs = [

src/google/protobuf/compiler/java/BUILD.bazel

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,6 @@ cc_library(
3333
],
3434
)
3535

36-
cc_library(
37-
name = "generator_headers",
38-
hdrs = ["generator.h"],
39-
copts = COPTS,
40-
strip_include_prefix = "/src",
41-
visibility = ["//pkg:__pkg__"],
42-
deps = [
43-
"//src/google/protobuf",
44-
"//src/google/protobuf/compiler:code_generator",
45-
],
46-
)
47-
4836
cc_library(
4937
name = "context",
5038
hdrs = [

src/google/protobuf/compiler/kotlin/BUILD.bazel

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
load("@rules_cc//cc:cc_library.bzl", "cc_library")
22
load("//build_defs:cpp_opts.bzl", "COPTS")
33

4-
cc_library(
5-
name = "generator_headers",
6-
hdrs = ["generator.h"],
7-
copts = COPTS,
8-
strip_include_prefix = "/src",
9-
visibility = ["//pkg:__pkg__"],
10-
deps = [
11-
"//src/google/protobuf",
12-
"//src/google/protobuf/compiler:code_generator",
13-
],
14-
)
15-
164
cc_library(
175
name = "kotlin",
186
srcs = ["generator.cc"],

src/google/protobuf/compiler/objectivec/BUILD.bazel

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,6 @@ cc_library(
1717
],
1818
)
1919

20-
cc_library(
21-
name = "generator_headers",
22-
hdrs = ["generator.h"],
23-
copts = COPTS,
24-
strip_include_prefix = "/src",
25-
visibility = ["//pkg:__pkg__"],
26-
deps = [
27-
"//src/google/protobuf",
28-
"//src/google/protobuf/compiler:code_generator",
29-
],
30-
)
31-
3220
cc_library(
3321
name = "names_internal",
3422
srcs = [

src/google/protobuf/compiler/python/BUILD.bazel

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,6 @@ load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
66
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
77
load("//build_defs:cpp_opts.bzl", "COPTS")
88

9-
cc_library(
10-
name = "generator_headers",
11-
hdrs = [
12-
"generator.h",
13-
"pyi_generator.h",
14-
],
15-
copts = COPTS,
16-
strip_include_prefix = "/src",
17-
visibility = ["//pkg:__pkg__"],
18-
deps = [
19-
"//src/google/protobuf",
20-
"//src/google/protobuf/compiler:code_generator",
21-
"@abseil-cpp//absl/container:flat_hash_map",
22-
"@abseil-cpp//absl/container:flat_hash_set",
23-
"@abseil-cpp//absl/memory",
24-
"@abseil-cpp//absl/strings",
25-
"@abseil-cpp//absl/synchronization",
26-
],
27-
)
28-
299
cc_library(
3010
name = "python",
3111
srcs = [

src/google/protobuf/compiler/ruby/BUILD.bazel

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,6 @@ load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
66
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
77
load("//build_defs:cpp_opts.bzl", "COPTS")
88

9-
cc_library(
10-
name = "generator_headers",
11-
hdrs = ["ruby_generator.h"],
12-
copts = COPTS,
13-
strip_include_prefix = "/src",
14-
visibility = ["//pkg:__pkg__"],
15-
deps = [
16-
"//src/google/protobuf",
17-
"//src/google/protobuf/compiler:code_generator",
18-
],
19-
)
20-
219
cc_library(
2210
name = "ruby",
2311
srcs = ["ruby_generator.cc"],

0 commit comments

Comments
 (0)