-
Notifications
You must be signed in to change notification settings - Fork 72
fix a few missing includes and ::proxy_wasm namespace pollution with std {} #365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Ivan Prisyazhnyy <john.koepi@gmail.com>
386813d
to
6f008f5
Compare
other possible solutions are:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though can you fix the check format failure?
Also, have you verified that Envoy CI builds successfully if you draft an Envoy test PR that modifies its proxy-wasm-cpp-host dependency to fetch this modified version?
👍 will fix the format in nearest weeks 🙌 |
I forgot to signoff the commit that fixes the formatting. So I will have to rebase it for DCO to work... |
fixes: In file included from external/proxy_wasm_cpp_host/src/null/null.cc:17: In file included from external/proxy_wasm_cpp_host/include/proxy-wasm/null_vm.h:22: In file included from external/proxy_wasm_cpp_host/include/proxy-wasm/null_vm_plugin.h:18: In file included from external/proxy_wasm_cpp_host/include/proxy-wasm/wasm_vm.h:26: In file included from external/proxy_wasm_cpp_host/include/proxy-wasm/word.h:22: external/proxy_wasm_cpp_sdk/proxy_wasm_common.h:59:8: error: no type named 'string' in namespace 'proxy_wasm::std'; did you mean '::std::string'? inline std::string toString(WasmResult r) { ^~~~~~~~~~~ ::std::string The headers from https://github.com/proxy-wasm/proxy-wasm-cpp-sdk include C++ headers that pollute the current namespace with a partial definition of std{} namespace that then interferes with the names resolution inside of proxy_wasm as well as duplicates ::std defs. Signed-off-by: Ivan Prisyazhnyy <john.koepi@gmail.com>
Signed-off-by: Ivan Prisyazhnyy <john.koepi@gmail.com>
d2177d3
to
31ac2eb
Compare
pushed with fixed DCO |
@mpwarres https://github.com/sitano/envoy/tree/ivan_proxy_wasm_fix_test - sitano/envoy@2eeb0ce
|
Approval needed from @PiotrSikora to submit, thanks! |
@sitano could you (or @mpwarres or @kyessenov) verify that Istio Proxy builds fine with this? I'd like to verify that it doesn't break Istio's Wasm / NullVM plugins before merging this. |
@PiotrSikora I can try to do it, but I don't see what to compile. Did you mean https://github.com/istio-ecosystem/wasm-extensions? the problem with this repo is that it uses very old version of the
Their bazel version is too old to have |
I meant Istio Proxy (https://github.com/istio/proxy). |
I will try to build with this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubber stamping this as the gatekeeper, but please resolve the remaining asks / comments before merging.
to have +using WasmResult = internal::WasmResult; instead of -using WasmResult = internal::proxy_wasm::WasmResult; the patchset fixes: In file included from external/proxy_wasm_cpp_host/src/null/null.cc:17: In file included from external/proxy_wasm_cpp_host/include/proxy-wasm/null_vm.h:22: In file included from external/proxy_wasm_cpp_host/include/proxy-wasm/null_vm_plugin.h:18: In file included from external/proxy_wasm_cpp_host/include/proxy-wasm/wasm_vm.h:26: In file included from external/proxy_wasm_cpp_host/include/proxy-wasm/word.h:22: external/proxy_wasm_cpp_sdk/proxy_wasm_common.h:59:8: error: no type named 'string' in namespace 'proxy_wasm::std'; did you mean '::std::string'? inline std::string toString(WasmResult r) { ^~~~~~~~~~~ ::std::string The headers from https://github.com/proxy-wasm/proxy-wasm-cpp-sdk include C++ headers that pollute the current namespace with a partial definition of std{} namespace that then interferes with the names resolution inside of proxy_wasm as well as duplicates ::std defs. Signed-off-by: Ivan Prisyazhnyy <john.koepi@gmail.com>
@mpwarres waiting for your input on the latest change to #365 (comment). see https://github.com/sitano/envoy/tree/ivan_proxy_wasm_fix_test with
|
proxy-wasm/proxy-wasm-cpp-host#365 Signed-off-by: Ivan Prisyazhnyy <john.koepi@gmail.com>
@mpwarres @PiotrSikora any desire to finish this one? |
Yes, sorry about the delay, will merge this tomorrow once I've confirmed Istio builds. |
fixes #364
reproduces:
Arch Linux, clang version 15.0.7, gcc version 13.2.1 20230801 (GCC)