-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix win32 breakage 18 dec #9399
Fix win32 breakage 18 dec #9399
Conversation
- gcc and clang may handle this but msvc does not - see section 16.3/11 of the standard Signed-off-by: William A Rowe Jr <[email protected]> Signed-off-by: Sunjay Bhatia <[email protected]>
On MSVC we cannot derive from TypedMetadataFactory::TypedMetadataFactory as it remains too abstract, and didn't have base class methods name or parse. Signed-off-by: Sunjay Bhatia <[email protected]> Signed-off-by: William A Rowe Jr <[email protected]>
This restores master to passing the validation Signed-off-by: William A Rowe Jr <[email protected]> Signed-off-by: Sunjay Bhatia <[email protected]>
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 modulo minor comments, which can be addressed in your senior approver round.
test/common/config/metadata_test.cc
Outdated
@@ -60,7 +60,7 @@ class TypedMetadataTest : public testing::Test { | |||
|
|||
struct Bar : public TypedMetadata::Object {}; | |||
|
|||
class FooFactory : public TypedMetadataFactory::TypedMetadataFactory { | |||
class FooFactory : public Envoy::Config::TypedMetadataFactory { |
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.
Why is this needed? It seems lexically obvious we are in a namespace where TypedMetadataFactory should be usable without qualification. If this cannot work I wonder what other things will fail?
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.
From this commit log;
TypedMetadataFactory::TypedMetadataFactory remains too abstract, and didn't have base class methods name or parse.
We are quite confused as well, this is the error output of the original source;
ERROR: C:/workspace/envoy/test/common/config/BUILD:261:1: C++ compilation of rule '//test/common/config:metadata_test_lib_internal_only' failed (Exit 2)
test/common/config/metadata_test.cc(63): error C2516: 'Envoy::Config::TypedMetadataFactory::{ctor}': is not a legal base class
test/common/config/metadata_test.cc(65): error C3668: 'Envoy::Config::`anonymous-namespace'::TypedMetadataTest::FooFactory::name': method with override specifier 'override' did not override any base class methods
test/common/config/metadata_test.cc(68): error C3668: 'Envoy::Config::`anonymous-namespace'::TypedMetadataTest::FooFactory::parse': method with override specifier 'override' did not override any base class methods
test/common/config/metadata_test.cc(54): error C2664: 'Envoy::Registry::InjectFactory<Envoy::Config::TypedMetadataFactory>::InjectFactory(const Envoy::Registry::InjectFactory<Envoy::Config::TypedMetadataFactory> &)': cannot convert argument 1 from 'Envoy::Config::`anonymous-namespace'::TypedMetadataTest::FooFactory' to 'Base &'
with
[
Base=Envoy::Config::TypedMetadataFactory
]
.\test/test_common/registry.h(17): note: see declaration of 'Envoy::Registry::InjectFactory<Envoy::Config::TypedMetadataFactory>::InjectFactory'
Things that are confusing, why promote TypedMetadataFactory:: to Envoy::Config:: in these contexts? Why the anon namespace? Suggestions and observations welcome.
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.
Does it work if you just extend TypedMetadataFactory
instead of TypedMetadataFactory::TypedMetadataFactory
? The latter seems to be nonsense, since there's no TypedMetadataFactory namespace in the code.
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.
@zuercher agreed, that was the issue. Will push the fix first thing Friday.
@zuercher for senior maintainer approval. |
Signed-off-by: Sunjay Bhatia <[email protected]> Signed-off-by: William A Rowe Jr <[email protected]>
@@ -112,7 +112,7 @@ class ApiBooster : public clang::ast_matchers::MatchFinder::MatchCallback, | |||
return true; | |||
} | |||
|
|||
// Visitor callback for end of a compiation unit. | |||
// Visitor callback for end of a compilation unit. |
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.
Can you remove "compiation" from the dictionary.
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.
Not on our fork. Will have to merge to master first.
@@ -161,7 +161,7 @@ class ApiBooster : public clang::ast_matchers::MatchFinder::MatchCallback, | |||
// Die hard if we don't have a useful proto type for something that looks | |||
// like an API type(modulo a short whitelist). | |||
std::cerr << "Unknown API type: " << proto_type_name << std::endl; | |||
// TODO(htuch): mabye there is a nicer way to terminate AST traversal? | |||
// TODO(htuch): maybe there is a nicer way to terminate AST traversal? |
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.
Likewise.
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.
I'd suggest you might be better off tracking the commit that added these, and work backwards to correct them (these are simply files that trip up verify on our roll-up of work, we didn't look for every misspelling.) These are only the few that we found, this was obviously pushed no-verify, and the spelling words added after the fact.
(see: [https://github.com//pull/9241] )
Signed-off-by: William A Rowe Jr <[email protected]>
Add missing legit word hackery Signed-off-by: William A Rowe Jr <[email protected]>
Signed-off-by: William A Rowe Jr <[email protected]>
/retest |
🤷♀️ nothing to rebuild. |
The OS/X failure to grab bazelisk-darwin-amd64 is unrelated to this commit, can you re-review this PR please, @zuercher? |
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.
Thanks!
This corrects the newest breakage on the Windows platform introduced in December. Risk Level: Low Testing: Local on Windows msvc and Linux gcc Docs Changes: n/a Release Notes: n/a Signed-off-by: William A Rowe Jr <[email protected]> Signed-off-by: Sunjay Bhatia <[email protected]> Signed-off-by: Prakhar <[email protected]>
Description:
This corrects the newest breakage on the Windows platform introduced in December.
Risk Level: Low
Testing: Local on Windows msvc and Linux gcc
Docs Changes: n/a
Release Notes: n/a