-
Notifications
You must be signed in to change notification settings - Fork 1
Update protos with v1Beta endpoint and regenerate proto code. #15
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # Data Connect protos | ||
| This folder contains the Data Connect protos defining the GRPC service. | ||
|
|
||
| # Google Protos | ||
| The google protos are obtained from https://github.com/googleapis/googleapis/tree/master | ||
|
|
||
| # Instructions to Generate the Swift files for the protos | ||
|
|
||
| ## Step 1: | ||
| (for Googlers) Copy the .proto files from | ||
|
|
||
| `third_party/firebase/dataconnect/emulator/server/api/connector_service.proto` | ||
|
|
||
| `third_party/firebase/dataconnect/emulator/server/api/graphql_error.proto` | ||
|
|
||
|
|
||
| ## Step 2: | ||
| If needed, adjust package name after discussion with server team. | ||
|
|
||
| Make following changes if needed - | ||
| - Follow same changes as specified by the copybara lines. | ||
| - Where it says strip, take that line out and follow any replace rules with a replace | ||
| - If protos reference any internal packages, those are typically not needed by the SDKs or these are marked with copybara strip rules. | ||
|
|
||
| ## Step 3: | ||
| Get the standard protoc compiler and ensure that it is in your system path | ||
|
|
||
| ## Step 4: | ||
| Get the protoc Swift gen plugin from the releases section of Swift GRPC | ||
|
|
||
| https://github.com/grpc/grpc-swift/releases | ||
|
|
||
| Under the 'Assets' section of a release, download the protoc-grpc-swift-plugins file for macOS. | ||
| Example: | ||
| protoc-grpc-swift-plugins-1.23.1.zip | ||
|
|
||
| ## Step 5: | ||
| Extract this in a location of your choice. You will need the folder path of the extracted folder. | ||
|
|
||
| ## Step 6: | ||
| Edit the `build_protos.sh` script that is present in the same folder as this Readme file. | ||
|
|
||
| Adjust the variables that configure the folder paths needed by the script | ||
|
|
||
| Note: If you don't have the protoc compiler in your PATH, you will need specify the full path of the protoc binary in the script above | ||
|
|
||
| ## Step 7: | ||
| Open a Terminal at the folder where the script is and run the build_protos.sh script | ||
|
|
||
| `sh build_protos.sh` | ||
|
|
||
|
|
||
| ## Step 8: | ||
| If this script executes successfully (i.e. no errors printed), it will place the generated files in the | ||
| `data-connect-ios-sdk/Sources/ProtoGen` folder | ||
|
|
||
| If any of the generated Swift files doesn't have the standard License, insert one. | ||
|
|
||
| ## Step 9: | ||
| If the proto package or endpoint names have changed you may get build errors. You will need to adjust the new name in two files | ||
|
|
||
| `data-connect-ios-sdk/Sources/Internal/GrpcClient.swift` | ||
|
|
||
| `data-connect-ios-sdk/Sources/Internal/Codec.swift` | ||
|
|
||
| ## Step 10: | ||
| Run Integration tests to confirm that the new protos are working fine. | ||
|
|
||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.