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

gPRC swift protobuf easy installation + easy file generataions #1318

Merged
merged 11 commits into from
Nov 24, 2021

Conversation

El-Moatasem
Copy link
Contributor

  1. Adding Easy Installation Using Homebrew Package
  2. Adding Automatic Files Generation Script in Build Phases Xcode

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 24, 2021

CLA Signed

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 for your patch @El-Moatasem, I left a few comments inline.

README.md Outdated
@@ -17,6 +17,17 @@ all four gRPC API styles (Unary, Server Streaming, Client Streaming, and
Bidirectional Streaming) and connections can be made either over secure (TLS) or
insecure channels.


## Homebrew (Easy Installation)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is just another way of getting the plugins for protoc, could you move this into the "Getting the protoc plugins" section? I don't think it needs its own subsection either; it just needs a note to say that the plugins are available from homebrew and can be installed with brew install grpc-swift (swift-protobuf is installed as a dependency of grpc-swift)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok Sure
I will move it there "Getting the protoc plugins" section
Thanks

README.md Outdated
@@ -17,6 +17,17 @@ all four gRPC API styles (Unary, Server Streaming, Client Streaming, and
Bidirectional Streaming) and connections can be made either over secure (TLS) or
insecure channels.


## Homebrew (Easy Installation)
1. Installing Swift-Protobuf :
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
1. Installing Swift-Protobuf :
1. Installing Swift Protobuf:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

README.md Outdated
```bash
$ brew install swift-protobuf
```
2. Installing GRPC-Swift :
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
2. Installing GRPC-Swift :
2. Installing gRPC Swift:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

README.md Outdated
Comment on lines 148 to 163
### Easy Files Generation:

When you have *.proto files in "Data/gRPC_Schema" in Xcode directory
You can add Build Phase Script for automatic generation for swift fils *.pb.swift and *.grpc.swift files on the same directory "Data/gRPC_Schema"

```bash
cd "${SRCROOT}/${TARGET_NAME}/Data/gRPC_Schema"
currentPath = "${SRCROOT}/${TARGET_NAME}/Data/gRPC_Schema"
for i in $(ls | egrep '\.proto$');
do echo "$i";
protoc "$i" \
--swift_out=Visibility=Public:. \
--grpc-swift_out=Visibility=Public,Client=true,Server=false:.;

done;
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we should include this section: build phase scripts aren't an unknown feature and the script itself is fairly simple. It's also highly likely to be different for different folks (different paths to .proto files, different plugin options and so on).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok Great
I think it depends on your usage and it's not complicated to build
I will remove it
Thanks

@glbrntt glbrntt added the semver/none No version bump required. label Nov 24, 2021
README.md Outdated
@@ -131,6 +133,17 @@ the following line to your `Podfile`:
pod 'gRPC-Swift-Plugins'
```

Homebrew (Easy Installation)
The plugins are available from homebrew and can be installed with :
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The plugins are available from homebrew and can be installed with :
The plugins are available from [homebrew](https://brew.sh) and can be installed with:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

README.md Outdated
Comment on lines 139 to 143
1. Installing Swift Protobuf : (swift-protobuf is installed as a dependency of grpc-swift)
```bash
$ brew install swift-protobuf
```
2. Installing gRPC Swift :
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
1. Installing Swift Protobuf : (swift-protobuf is installed as a dependency of grpc-swift)
```bash
$ brew install swift-protobuf
```
2. Installing gRPC Swift :

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

README.md Outdated
```
2. Installing gRPC Swift :
```bash
$ brew install grpc-swift
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
$ brew install grpc-swift
$ brew install swift-protobuf grpc-swift

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

README.md Outdated
@@ -131,6 +131,18 @@ the following line to your `Podfile`:
pod 'gRPC-Swift-Plugins'
```

#### Homebrew (Easy Installation) :
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#### Homebrew (Easy Installation) :
#### Homebrew

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

README.md Outdated
@@ -131,6 +131,14 @@ the following line to your `Podfile`:
pod 'gRPC-Swift-Plugins'
```

#### Homebrew :
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#### Homebrew :
#### Homebrew

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

README.md Outdated
#### Homebrew :

The plugins are available from [homebrew](https://brew.sh) and can be installed with:
1. Installing Swift Protobuf / gRPC Swift :
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
1. Installing Swift Protobuf / gRPC Swift :

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

README.md Outdated
```bash
$ brew install swift-protobuf grpc-swift
```

The plugins are available in the `Pods/gRPC-Swift-Plugins/` folder afterwards.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, this line has escaped from the section above, it should come before the #### Homebrew line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup
You are right!

Done

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.

Great, thank you!

@glbrntt glbrntt merged commit f1323a2 into grpc:main Nov 24, 2021
bimawa pushed a commit to StreamLayer/grpc-swift that referenced this pull request Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants