Skip to content

Commit

Permalink
test: start dissolving :printers_include rule. (#14429)
Browse files Browse the repository at this point in the history
Additional Description:
A rule that exports a header without defining all the symbols declared
by that header causes ODR violations. Basically, Bazel rules should
never contain "include" rules like this. Rather, printer.h and
printer.cc should be served from the same library.

This change is a cautious, local first step. A second step can later
remove the printer_include rule and replace its uses with printer_lib.

Risk Level: low
Testing:
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Thomas Köppe <[email protected]>
  • Loading branch information
tkoeppe authored Dec 16, 2020
1 parent 95b7ef2 commit ae1ed1f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/test_common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ envoy_basic_cc_library(
name = "printers_includes",
hdrs = ["printers.h"],
deps = [
":printers_lib",
"//include/envoy/network:address_interface",
],
)
Expand Down Expand Up @@ -86,9 +87,12 @@ envoy_cc_test_library(

envoy_cc_library(
name = "printers_lib",
srcs = ["printers.cc"],
srcs = [
"printers.cc",
"printers.h",
],
deps = [
":printers_includes",
"//include/envoy/network:address_interface",
"//source/common/buffer:buffer_lib",
"//source/common/http:header_map_lib",
],
Expand Down

0 comments on commit ae1ed1f

Please sign in to comment.