Repository navigation
Conversation
WilliamRoebuck
left a comment
There was a problem hiding this comment.
I like removing the error before/after ready distinction, that part was always quite confusing to me. Unfortunately though, a lot of the new changes have just become out of date yesterday since #738.
In summary, the whole async issue is no longer present, kWaiting can probably be removed. As far as I know:
tryReportCompletionis no longer needed. Existing calls should be replaced or removedtryHandleTermination- should now only flag an error to the caller or return some sort of void/ignore result (no error yet). Should never returnkSuccess. Terminations during startup are resolved at the end using the stored termination result member.activate&deactivate- always runs synchronously and returns success or failure
This all probably allows process monitor to be simplified as well
There are also some leftover unit tests (several of the parameterized ones) that test various async termination scenarios, most of which can be removed.
This is good to hear. I think most of the dead code will be replaced anyway as part of #705, so in this pull request I'll only make the minimal edits needed to change the error types. |
|
@WilliamRoebuck I've removed the async values from the enums. I'd appreciate if you could take another look :)) |
90a525a to
3d86568
Compare
|
Documentation preview for this pull request is available at: |
WilliamRoebuck
left a comment
There was a problem hiding this comment.
Looks great now, I only have two small suggestions
| IdentifierHash node_identifier; | ||
| /// @brief Description of the error. | ||
| IComponent::ComponentError reason; | ||
| /// @brief Why the activation failed, either kFailure or kTimeout. |
There was a problem hiding this comment.
I think RequestResult should still be an expected (expected_blank I think) with an error code. Something that can be kSuccess being an error code seems wrong to me.
|
Changes look good to me, though unit test compilation is currently failing on this branch |
The old result was difficult to understand because some values had multiple meanings, and different things were valid depending on the context. Split into two results, one for de/activate and one for termination. The interesting changes are in `icomponent.hpp`.
492c494 to
bc35e30
Compare
I struggled to understand the original code because some values had multiple meanings, and different things were valid depending on the context.
Split into two results, one for de/activate and one for termination. The interesting changes are in
icomponent.hpp.Part of addressing #705 (comment)