envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.76k stars 4.76k forks source link

Prefix #include of external deps with dep name #2451

Open htuch opened 6 years ago

htuch commented 6 years ago

Currently we have lines such as #include "ares.h" in source/exe/main_common.cc. This is because all external dependencies share a common global include root (e.g. /thirdparty_build/include). It's somewhat saner to have each dependency in its own include prefix path when remapping during site specific import of the tree, e.g. we would have #include "external/ares/ares.h".

This is not particularly acute for Google today, but opening a tracking issue to capture further discussion.

htuch commented 6 years ago

@genioshelo @mrice32 @jmillikin-stripe this came up during some recent import work where we were remapping paths. We have a simple sed workaround that works fine.

mattklein123 commented 6 years ago

I would prefer this also FWIW.

jmillikin-stripe commented 6 years ago

I like this also. Often in my personal projects I use cc_library options to make the imports look Go-ish, and it might be possible to use similar logic here.

Does this apply only to the "build recipe" deps, or does the same issue exist for Bazel-managed externals?