Skip to content

gRPC: replace Objective-C implementation with the new C++ implementation #1968

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 32 commits into from
Oct 26, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
805b673
gRPC: add support for SSL disabled to `GrpcConnection`.
var-const Oct 18, 2018
839f408
gRPC: make gRPC calls using the C++ implementation:
var-const Oct 18, 2018
a93b783
C++: port `MockWatchStream` and `MockWriteStream` to C++.
var-const Oct 18, 2018
4fe32a1
No longer generate Objective-C gRPC service definitions from protos.
var-const Oct 18, 2018
0ea6fcc
Remove all references to Objective-C gRPC client.
var-const Oct 18, 2018
21d30b6
Use local certificate for now
var-const Oct 22, 2018
7f60ad0
Fix/improve ASCII conversion
var-const Oct 22, 2018
feb0285
Review feedback
var-const Oct 22, 2018
8332a5f
style.sh
var-const Oct 22, 2018
ab6df2e
Appease linter
var-const Oct 22, 2018
9f9d94d
Undo accidental change
var-const Oct 22, 2018
555e1d8
missing word
var-const Oct 22, 2018
6f0d4e6
add comment
var-const Oct 22, 2018
84e454b
Remove leftover reference to Objective-C gRPC
var-const Oct 22, 2018
c96f670
More using declarations
var-const Oct 22, 2018
e2e53b0
typo
var-const Oct 22, 2018
1bcfc0f
Use Path instead of plain string
var-const Oct 22, 2018
2d68f12
Missed include
var-const Oct 22, 2018
80a938e
Remove redundant word
var-const Oct 22, 2018
9c1dec6
Remove ASCII conversion when loading certificates, it is not necessary
var-const Oct 23, 2018
d638062
Compilation fix
var-const Oct 23, 2018
abceb14
Review feedback
var-const Oct 23, 2018
dc872a7
Tweak comment
var-const Oct 23, 2018
c4d99d7
Move certificate to Firestore/etc/roots.pem
var-const Oct 23, 2018
90c3b43
Forgotten file
var-const Oct 24, 2018
cf856e6
Review feedback
var-const Oct 24, 2018
33555c9
Forgotten comment
var-const Oct 24, 2018
f1c8f5d
Fix test
var-const Oct 24, 2018
1a5acc7
Review feedback
var-const Oct 25, 2018
101b611
Fix flaky test
var-const Oct 25, 2018
1f6ee21
Merge branch 'master' into varconst/grpc-integr82
var-const Oct 25, 2018
348a924
Fix bad port
var-const Oct 25, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Firestore/Protos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ endfunction()
#
# Libprotobuf Objective-C also includes the well-known protos so they must be
# omitted here.
#
# The Objective-C client also uses the generated gRPC stubs for the Firestore
# service.
Copy link
Member

Choose a reason for hiding this comment

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

If we've removed the objc grpc stubs, don't we now need the cpp ones?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FSTDatastore uses the generated service to make the backend calls (example). In C++ Datastore, I'm using gRPC objects directly. I chose that approach primarily because it was more straightforward; I can look into code generation as a follow-up.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we can do this without generated code that's better. The generated code is essentially dead-weight given the way we're doing our own serialization so let's avoid it.

set(
PROTOBUF_OBJC_GENERATED_SOURCES
${OUTPUT_DIR}/objc/google/firestore/v1beta1/Firestore.pbrpc.h
Expand Down Expand Up @@ -284,12 +281,10 @@ add_custom_command(
${CMAKE_CURRENT_SOURCE_DIR}/build_protos.py
--objc
--protoc=$<TARGET_FILE:protoc>
--protoc_gen_grpc=$<TARGET_FILE:grpc_objective_c_plugin>
--output_dir=${OUTPUT_DIR}
${PROTO_INCLUDES}
VERBATIM
DEPENDS
grpc_objective_c_plugin
protoc
${CMAKE_CURRENT_SOURCE_DIR}/build_protos.py
${PROTO_FILES}
Expand Down
11 changes: 2 additions & 9 deletions Firestore/Protos/build_protos.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ def main():
parser.add_argument(
'--include', '-I', action='append', default=[],
help='Adds INCLUDE to the proto path.')
parser.add_argument(
'--protoc_gen_grpc',
help='Location of the gRPC generator executable.')

args = parser.parse_args()
if args.nanopb is None and args.cpp is None and args.objc is None:
Expand Down Expand Up @@ -165,14 +162,10 @@ def run(self):
)

def __run_generator(self, out_dir):
"""Invokes protoc using the objc and grpc plugins."""
"""Invokes protoc using the objc plugin."""
cmd = protoc_command(self.args)

gen = self.args.protoc_gen_grpc
if gen is not None:
cmd.append('--plugin=protoc-gen-grpc=%s' % gen)

cmd.extend(['--objc_out=' + out_dir, '--grpc_out=' + out_dir])
cmd.extend(['--objc_out=' + out_dir])
cmd.extend(self.proto_files)
run_protoc(self.args, cmd)

Expand Down
268 changes: 0 additions & 268 deletions Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h

This file was deleted.

Loading