-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
[C++] Refactor util::Status #8354
Conversation
@@ -37,61 +37,64 @@ | |||
namespace google { | |||
namespace protobuf { | |||
namespace util { | |||
namespace error { |
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.
What's the rationale for moving this to a new internal
subdirectory?
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.
Just stylistic preference. We can keep the implementation in this file if you'd like, with or without namespace status_internal
(although I'd prefer keeping the namespace to already give a hint that the symbols will come from a different namespace eventually)
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.
OK, I think it would be good to keep the code in the same files but moving them into a status_internal
namespace sounds good.
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.
Alright, done!
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 for running presubmit!
I tried looking at the logs but it seems like I don't have permissions.
@@ -37,61 +37,64 @@ | |||
namespace google { | |||
namespace protobuf { | |||
namespace util { | |||
namespace error { |
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.
Just stylistic preference. We can keep the implementation in this file if you'd like, with or without namespace status_internal
(although I'd prefer keeping the namespace to already give a hint that the symbols will come from a different namespace eventually)
The CI run is showing an error like this:
|
This change refactors util::Status to have a similar shape as the recently open-sourced absl::Status. This will allow Protobuf to eventually use absl::Status and reduce the codesize. Note that there is more work required before absl::Status can be used.
Thanks! Looks like there was a second use of |
Thanks @Yannic, it looks like there are a couple more call sites to fix in the conformance tests:
|
Thanks, fixed |
This change refactors util::Status to have a similar shape as the
recently open-sourced absl::Status. This will allow Protobuf to
eventually use absl::Status and reduce the codesize.
Note that there is more work required before absl::Status can be used.