-
Notifications
You must be signed in to change notification settings - Fork 10.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
Enable treating warnings as errors in objc tests #6922
Conversation
@y-zeng Please undo all changes regarding the deprecation warning regarding Proto* classes. Our customers still use the old (deprecated) names, which we will support for some time to come. |
Thanks for the review! The changes regarding the deprecated API has been undone. Added an exception for the incompatible-pointer-types warning caused by it. |
LGTM. |
@@ -65,6 +65,8 @@ - (instancetype)initWithHost:(NSString *)host | |||
return self; | |||
} | |||
|
|||
#pragma clang diagnostic push | |||
#pragma clang diagnostic ignored "-Wincompatible-pointer-types" |
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 code triggering this warning? Sounds like something we should fix.
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.
method:methodName
triggers this warning. methodName
has type 'ProtoMethod *', but 'GRPCProtoMethod *' is expected here. Looks like it's caused by the deprecated API.
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.
Ah, then let's just create a GRPCProtoMethod
in line 74, no? :) Better than silencing a warning we want.
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.
@makdharma's justified comment was about changing the signature of this method. We're free to change the implementation.
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.
Fixed. I misunderstood the comment 😅
Removed the silencing for incompatible-pointer-types Removed unused objects Fixed format issues
Test failures look unrelated. LGTM and marking ready to merge |
I just tried to build this branch locally and I run into cocoapods version issue. @y-zeng Have you tried building it with cocoapods 0.39? [!] Invalid from /private/tmp/issue6922/src/objective-c/tests/Podfile:4-------------------------------------------
|
Passes with cocoapods 1.0.0. |
@@ -58,7 +58,7 @@ + (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize | |||
requestedResponseSize:(NSNumber *)responseSize { | |||
RMTStreamingOutputCallRequest *request = [self message]; | |||
RMTResponseParameters *parameters = [RMTResponseParameters message]; | |||
parameters.size = responseSize.integerValue; | |||
parameters.size = (int)responseSize.integerValue; |
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 not just call [responseSize intValue] instead of casting?
Related issue: #5684