Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions bazel/DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ be sorted alphabetically by their `name` attribute.

All modules that make up the Envoy binary are statically linked at compile time.
Many of the modules within Envoy have a pure virtual interface living in
[`include/envoy`](../include/envoy), implementation sources in
[`envoy`](../envoy), implementation sources in
[`source`](../source), mocks in [`test/mocks`](../test/mocks) and
unit/integration tests in [`test`](../test). The relevant `BUILD` files will
require updating or to be added in these locations as you extend Envoy.

As an example, consider adding the following interface in `include/envoy/foo/bar.h`:
As an example, consider adding the following interface in `envoy/foo/bar.h`:

```c++
#pragma once
Expand All @@ -43,23 +43,23 @@ public:
...
```

This would require the addition to `include/envoy/foo/BUILD` of the following target:
This would require the addition to `envoy/foo/BUILD` of the following target:

```python
envoy_cc_library(
name = "bar_interface",
hdrs = ["bar.h"],
deps = [
":baz_interface",
"//include/envoy/buffer:buffer_interface",
"//envoy/buffer:buffer_interface",
],
)
```

This declares a new target `bar_interface`, where the convention is that pure
virtual interfaces have their targets suffixed with `_interface`. The header
`bar.h` is exported to other targets that depend on
`//include/envoy/foo:bar_interface`. The interface target itself depends on
`//envoy/foo:bar_interface`. The interface target itself depends on
`baz_interface` (in the same directory, hence the relative Bazel label) and
`buffer_interface`.

Expand All @@ -82,11 +82,11 @@ class BarImpl : public Bar {
and `source/common/foo/bar_impl.cc`:

```c++
#include "common/foo/bar_impl.h"
#include "source/common/foo/bar_impl.h"

#include "common/buffer/buffer_impl.h"
#include "common/foo/bar_internal.h"
#include "common/foo/baz_impl.h"
#include "source/common/buffer/buffer_impl.h"
#include "source/common/foo/bar_internal.h"
#include "source/common/foo/baz_impl.h"
...
```

Expand All @@ -102,7 +102,7 @@ envoy_cc_library(
hdrs = ["bar_impl.h"],
deps = [
":baz_lib",
"//include/envoy/foo:bar_interface",
"//envoy/foo:bar_interface",
"//source/common/buffer:buffer_lib",
],
)
Expand All @@ -120,7 +120,7 @@ envoy_cc_mock(
srcs = ["mocks.cc"],
hdrs = ["mocks.h"],
deps = [
"//include/envoy/foo:bar_interface",
"//envoy/foo:bar_interface",
...
],
)
Expand Down
2 changes: 1 addition & 1 deletion bazel/PPROF.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Example:

```c++
// includes
#include "common/profiler/profiler.h"
#include "source/common/profiler/profiler.h"
...
Function(...) {
if (!Profiler::Cpu::startProfiler(profile_path)) {
Expand Down
2 changes: 1 addition & 1 deletion tools/api_versioning/generate_api_version_header_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class GenerateApiVersionHeaderTest(unittest.TestCase):
EXPECTED_TEMPLATE = string.Template(
"""#pragma once
#include "common/version/api_version_struct.h"
#include "source/common/version/api_version_struct.h"

namespace Envoy {

Expand Down
2 changes: 1 addition & 1 deletion tools/code_format/header_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def reorder_headers(path):

# Filter for includes that finds the #include of the header file associated with the source file
# being processed. E.g. if 'path' is source/common/common/hex.cc, this filter matches
# "common/common/hex.h".
# "source/common/common/hex.h".
def file_header_filter():
return lambda f: f.endswith('.h"') and path.endswith(f[1:-3] + '.cc')

Expand Down
2 changes: 1 addition & 1 deletion tools/testdata/check_format/angle_bracket_include.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
namespace Envoy {

#include <common/common/utility.h>
#include <source/common/common/utility.h>

} // namespace Envoy
2 changes: 1 addition & 1 deletion tools/testdata/check_format/angle_bracket_include.cc.gold
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
namespace Envoy {

#include "common/common/utility.h"
#include "source/common/common/utility.h"

} // namespace Envoy