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

Add Cocoapod Support for SwiftGRPC #764

Merged

Conversation

Jake-Prickett
Copy link
Contributor

@Jake-Prickett Jake-Prickett commented Mar 24, 2020

  • Added CGRPCZlib.podspec to enable the gRPC-Swift CocoaPod
  • Created gRPC-Swift.podspec 🎉
  • Added proper maintainers to both Pods
  • Added similar build_podspec script that will read from Package.resolved

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 24, 2020

CLA Check
The committers are authorized under a signed CLA.

Copy link
Collaborator

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Jake-Prickett -- great start!

Would it be better to leverage something similar to what is done in SwiftNIO build_podspecs.sh?

Yes: I think it would make life easier in the long run.

Who would be the best people to add as Maintainers for the CGRPCZlib CocoaPod?

You (if you don't mind!), me, @MrMage and @Lukasa

The maintainers for the gRPC Swift CocoaPod should be the same.

CGRPCZlib.podspec Outdated Show resolved Hide resolved
CGRPCZlib.podspec Outdated Show resolved Hide resolved
CGRPCZlib.podspec Outdated Show resolved Hide resolved
CGRPCZlib.podspec Outdated Show resolved Hide resolved
CGRPCZlib.podspec Outdated Show resolved Hide resolved
SwiftGRPC.podspec Outdated Show resolved Hide resolved
SwiftGRPC.podspec Outdated Show resolved Hide resolved
@Jake-Prickett Jake-Prickett force-pushed the jake-prickett/grpc-swift-cocoapod-support branch from 2d42af7 to cb338e8 Compare March 27, 2020 20:07
@Jake-Prickett Jake-Prickett force-pushed the jake-prickett/grpc-swift-cocoapod-support branch 2 times, most recently from 0a0a00d to 4a7dd5e Compare April 3, 2020 20:53
@Jake-Prickett Jake-Prickett requested review from glbrntt and MrMage April 3, 2020 20:55
@SebastianThiebaud
Copy link
Contributor

I'm not sure this is related to this PR but the license file referenced in https://github.com/CocoaPods/Specs/blob/master/Specs/1/e/a/CGRPCZlib/1.0.0-alpha.11/CGRPCZlib.podspec.json is not right. It should be LICENSE, not LICENSE.txt.
Right now, Cocoapods is displaying warning messages when installing pods

[!] Unable to read the license file `LICENSE.txt` for the spec `CGRPCZlib (1.0.0-alpha.11)`

Thank you

@Jake-Prickett
Copy link
Contributor Author

Good catch @SebastianThiebaud! I noticed the same thing when working through the Podspec Generation script. I've made the changes in script so it won't appear in the future and believe that should be fixed with the next release :)

@SebastianThiebaud
Copy link
Contributor

Good catch @SebastianThiebaud! I noticed the same thing when working through the Podspec Generation script. I've made the changes in script so it won't appear in the future and believe that should be fixed with the next release :)

Awesome. That's what I thought, just wanted to make sure this script would also apply to CGRPCZlib. Thanks for the awesome work y'all! :)

@Jake-Prickett Jake-Prickett force-pushed the jake-prickett/grpc-swift-cocoapod-support branch from 4a7dd5e to 2741421 Compare April 4, 2020 13:04
Copy link
Collaborator

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @Jake-Prickett, there are a couple of minor issues to fix but I'm happy with it otherwise!

scripts/build_podspecs.py Outdated Show resolved Hide resolved
scripts/build_podspecs.py Outdated Show resolved Hide resolved
scripts/build_podspecs.py Show resolved Hide resolved
scripts/build_podspecs.py Outdated Show resolved Hide resolved
scripts/build_podspecs.py Show resolved Hide resolved
@MrMage
Copy link
Collaborator

MrMage commented Apr 6, 2020

Do you plan to also add the resulting Podspec file to the repo? If so, should that be part of this PR?

@Jake-Prickett
Copy link
Contributor Author

@glbrntt - Comments have been addressed, thank you for the review!

@MrMage - I was not planning on adding the Podspec file to the repository. The goal of the script is to generate the Podspec files (CGRPCZlib & gRPC-Swift) to a temp location when it is time for a release and push them. Any preference or thoughts? 😄

@MrMage
Copy link
Collaborator

MrMage commented Apr 6, 2020

@MrMage - I was not planning on adding the Podspec file to the repository. The goal of the script is to generate the Podspec files (CGRPCZlib & gRPC-Swift) to a temp location when it is time for a release and push them. Any preference or thoughts? 😄

I prefer to have the Podspec file in the repo. This is common practice among most packages, allows for quick inspection of the file by anyone, and having it in version control allows us to better review any changes to it.

@glbrntt
Copy link
Collaborator

glbrntt commented Apr 6, 2020

@MrMage - I was not planning on adding the Podspec file to the repository. The goal of the script is to generate the Podspec files (CGRPCZlib & gRPC-Swift) to a temp location when it is time for a release and push them. Any preference or thoughts? 😄

I prefer to have the Podspec file in the repo. This is common practice among most packages, allows for quick inspection of the file by anyone, and having it in version control allows us to better review any changes to it.

I'm not opposed to having them checked in in addition to the script. To that end it would be useful if the script could take a path argument indicating where the podspecs should be generated.

@Jake-Prickett Jake-Prickett force-pushed the jake-prickett/grpc-swift-cocoapod-support branch from 7dac322 to 177dea2 Compare April 6, 2020 13:18
@Jake-Prickett
Copy link
Contributor Author

@MrMage @glbrntt That sounds like a fair middle ground. 👍 Added a path parameter (-p) to the build script that allows for the consumer to pass a desired path for Podspec generation. Additionally, if we do not provide a path, it will default to the cwd.

python scripts/build_podspecs.py 1.0.0-alpha.11

or

python scripts/build_podspecs.py -p . 1.0.0-alpha.11

Copy link
Collaborator

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spotted a small bug which I missed last time around (it's been a while since I looked at Python...)

scripts/build_podspecs.py Outdated Show resolved Hide resolved
@mefilt
Copy link

mefilt commented Apr 6, 2020

Hey every one. Me also need grps for cocoapods.
When will you approving pull request?
Can i help you?
Thx

@Jake-Prickett
Copy link
Contributor Author

Hi @mefilt, the gRPC-Swift CocoaPod is available now if you would like to consume it. 👍

Copy link
Collaborator

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome; thanks for working on this @Jake-Prickett! Over to you @MrMage.

Copy link
Collaborator

@MrMage MrMage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for all the work that went into this!

Just nits; feel free to push back if you disagree with any of them.

s.module_name = 'CGRPCZlib'
s.version = '1.0.0-alpha.11'
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
s.summary = 'Swift gRPC code generator plugin and runtime library'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should CGRPCZlib have a different summary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can, I was thinking having something more generic that might fit both would keep the generation script simple. What do you think @MrMage? I'm open to either way 👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I would use a slightly different description for each, to avoid confusing anyone who looks up either package at the CocoaPods site. I understand that would need a bit of additional code, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, that does make sense. Would you mind if I took that one up as a follow-up item and address it separately?

CGRPCZlib.podspec Outdated Show resolved Hide resolved
scripts/build_podspecs.py Outdated Show resolved Hide resolved
scripts/build_podspecs.py Show resolved Hide resolved
@Jake-Prickett Jake-Prickett force-pushed the jake-prickett/grpc-swift-cocoapod-support branch from a23777f to feb557a Compare April 7, 2020 12:38
Copy link
Collaborator

@MrMage MrMage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No mandatory changes from my side; feel free to change the pod descriptions in a follow-up PR.

Leaving the merge to @glbrntt.

@glbrntt glbrntt merged commit 944c70a into grpc:master Apr 7, 2020
@Jake-Prickett Jake-Prickett deleted the jake-prickett/grpc-swift-cocoapod-support branch April 18, 2020 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants