Fix win32 breakage 18 dec#9399
Fix win32 breakage 18 dec#9399zuercher merged 7 commits intoenvoyproxy:masterfrom greenhouse-org:fix-win32-breakage-18-dec
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 <wrowe@pivotal.io> Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io>
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 <sbhatia@pivotal.io> Signed-off-by: William A Rowe Jr <wrowe@pivotal.io>
This restores master to passing the validation Signed-off-by: William A Rowe Jr <wrowe@pivotal.io> Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io>
jmarantz
left a comment
There was a problem hiding this comment.
lgtm modulo minor comments, which can be addressed in your senior approver round.
test/common/config/metadata_test.cc
Outdated
| struct Bar : public TypedMetadata::Object {}; | ||
|
|
||
| class FooFactory : public TypedMetadataFactory::TypedMetadataFactory { | ||
| class FooFactory : public Envoy::Config::TypedMetadataFactory { |
There was a problem hiding this comment.
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.
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.
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.
@zuercher agreed, that was the issue. Will push the fix first thing Friday.
|
@zuercher for senior maintainer approval. |
Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io> Signed-off-by: William A Rowe Jr <wrowe@pivotal.io>
| } | ||
|
|
||
| // Visitor callback for end of a compiation unit. | ||
| // Visitor callback for end of a compilation unit. |
There was a problem hiding this comment.
Can you remove "compiation" from the dictionary.
There was a problem hiding this comment.
Not on our fork. Will have to merge to master first.
| // 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.
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 <wrowe@pivotal.io>
Add missing legit word hackery Signed-off-by: William A Rowe Jr <wrowe@pivotal.io>
Signed-off-by: William A Rowe Jr <wrowe@pivotal.io>
|
/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? |
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 <wrowe@pivotal.io> Signed-off-by: Sunjay Bhatia <sbhatia@pivotal.io> Signed-off-by: Prakhar <prakhar_au@yahoo.com>
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