-
Notifications
You must be signed in to change notification settings - Fork 14
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
Take list of pass-through types from config instead of hardcoding #190
Conversation
std::set<std::string> defaultHeaders{}; | ||
std::set<std::string> defaultNamespaces{}; | ||
std::vector<std::pair<std::string, std::string>> membersToStub{}; | ||
std::set<fs::path> containerConfigPaths; |
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.
The {}
makes no difference on these members, as class-objects are always default initialised if not initialised explicitly.
However, the error messages are a lot clearer without the {}
and removing them allowed me to track down all the locations OICodeGen was being copied.
Codecov Report
@@ Coverage Diff @@
## main #190 +/- ##
==========================================
+ Coverage 65.19% 65.37% +0.17%
==========================================
Files 87 87
Lines 9429 9452 +23
Branches 1557 1560 +3
==========================================
+ Hits 6147 6179 +32
+ Misses 2459 2447 -12
- Partials 823 826 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
oi/OICodeGen.h
Outdated
/* | ||
* Note: don't set default values for the config so the user gets an | ||
* uninitialized field" warning if they missed any. | ||
*/ |
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.
@ttreyer I don't understand what exactly this comment is getting at. I've tried a few things and can't seem to get an uninitialised field warning
@@ -47,3 +47,8 @@ containers = [ | |||
"PWD/types/thrift_isset_type.toml", | |||
"PWD/types/weak_ptr_type.toml", | |||
] | |||
pass_through = [ |
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.
Which README.md
do we document these options in? I can't see anything in this diff but swore we docuemnted them somewhere (not the toml container stuff).
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.
This file isn't documented yet.
We've got READMEs for the container types config format and for the integration test format, nothing else so far
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.
That's great Alastair. Just one point about documenting the new option which I'm sure you've got covered anyway.
As we now store ContainerInfo objects in OICodeGen::Config, we can not copy it any more. Change all places that took copies to take const references instead. The copy in OICodeGen modified membersToStub, the contents of which form part of OICache's hash. However, as OICache also previously had its own copy, it would not have been OICodeGen's modifications.
Thanks, yeah we will document this file at some point, but I'll leave it for a separate PR |
As we now store ContainerInfo objects in OICodeGen::Config, we can not copy it any more. Change all places that took copies to take const references instead.
The copy in OICodeGen modified membersToStub, the contents of which form part of OICache's hash. However, as OICache also previously had its own copy, it would not have been OICodeGen's modifications.