Hack to allow conditionally compiling out lightstep#982
Hack to allow conditionally compiling out lightstep#982tschroed wants to merge 5 commits intoenvoyproxy:masterfrom
Conversation
| #include "common/tracing/http_tracer_impl.h" | ||
| #ifndef DISABLE_LIGHTSTEP_TRACING | ||
| #include "common/tracing/lightstep_tracer_impl.h" | ||
| +#endif // DISABLE_LIGHTSTEP_TRACING |
There was a problem hiding this comment.
:/ It would seem that I patched over from g3 but didn't actually build. I am cleaning this up and a couple of other things.
| srcs = ["configuration_impl.cc"], | ||
| hdrs = ["configuration_impl.h"], | ||
| copts = select({ | ||
| "//bazel:disable_lightstep_tracing": ["-DDISABLE_LIGHTSTEP_TRACING"], |
There was a problem hiding this comment.
nit: This is where I would put the hack TODO comment. If we do registration correctly, we should not need any defines. We are going to have to have selectors no matter what to compile different code.
| "//bazel:disable_lightstep_tracing": [], | ||
| "//conditions:default": ["lightstep_tracer_impl.h"], | ||
| }), | ||
| external_deps = ["lightstep"], |
There was a problem hiding this comment.
"select" is actually a type that's implemented by skylark. I haven't figured out how (or if) to get at its contents from within build extensions. Obviously we'll need to figure it out long term, I just haven't done that here.
There was a problem hiding this comment.
Is it possible to separate lightstep_tracer_impl.{cc,h} as a separate cc_library and use select in deps?
It will help our use case in istio proxy so we don't need build lightstep at all, cc #840
gets pruned because it's not used, but that's pretty icky. Let's not bother building at all.
|
Let's close this for now. I'll bug @mrice32 about adding the appropriate bazel conditionals to the build system to select lightstep and zipkin. |
Automatic merge from submit-queue. [DO NOT MERGE] Auto PR to update dependencies of proxy This PR will be merged automatically once checks are successful. ```release-note none ```
This has a few small changes 1. Always apply `--incompatible_objc_compile_info_migration` so that when you switch between configurations this doesn't force bazel to reanalyze all targets 2. Use consistent `--define` `=` syntax Signed-off-by: Keith Smiley <keithbsmiley@gmail.com> Signed-off-by: JP Simard <jp@jpsim.com>
This has a few small changes 1. Always apply `--incompatible_objc_compile_info_migration` so that when you switch between configurations this doesn't force bazel to reanalyze all targets 2. Use consistent `--define` `=` syntax Signed-off-by: Keith Smiley <keithbsmiley@gmail.com> Signed-off-by: JP Simard <jp@jpsim.com>
Compiling in lightstep also brings in the opensource version of protobuf. Unfortunately, this introduces link time conflicts with (nearly) the same library in Google when bringing in Google dependencies.
We're working on that but it's going to take some time. Issue 967 tracks implementation of a generalized registry which provides a more elegant solution.