Skip to content
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

Merged
merged 6 commits into from
Jun 23, 2016

Conversation

y-zeng
Copy link
Contributor

@y-zeng y-zeng commented Jun 16, 2016

Related issue: #5684

@makdharma
Copy link
Contributor

@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.

@y-zeng
Copy link
Contributor Author

y-zeng commented Jun 20, 2016

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.

@makdharma
Copy link
Contributor

LGTM.
@jcanizales Please take a look as well.

@@ -65,6 +65,8 @@ - (instancetype)initWithHost:(NSString *)host
return self;
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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 😅

y-zeng added 2 commits June 21, 2016 11:18
Removed the silencing for incompatible-pointer-types
Removed unused objects
Fixed format issues
@makdharma
Copy link
Contributor

Test failures look unrelated. LGTM and marking ready to merge

@makdharma
Copy link
Contributor

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 Podfile file: undefined method `install!' for #Pod::Podfile:0x007f899438d360. Updating CocoaPods might fix the issue.

from /private/tmp/issue6922/src/objective-c/tests/Podfile:4

-------------------------------------------

install! 'cocoapods', :deterministic_uuids => false

-------------------------------------------

FAILED: src/objective-c/tests/build_tests.sh [ret=1, pid=75274]
FAILED: Some tests failed

@makdharma
Copy link
Contributor

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;
Copy link
Contributor

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?

@lock lock bot locked as resolved and limited conversation to collaborators Jan 27, 2019
@lock lock bot unassigned makdharma Jan 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants