Page MenuHomePhabricator

[services] Export comm's grpc generated files as cmake project
ClosedPublic

Authored by jon on Apr 27 2022, 5:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 6:12 AM
Unknown Object (File)
Sat, Nov 16, 5:17 AM
Unknown Object (File)
Sat, Nov 16, 5:12 AM
Unknown Object (File)
Wed, Nov 13, 10:46 AM
Unknown Object (File)
Wed, Nov 13, 10:46 AM
Unknown Object (File)
Wed, Nov 13, 10:46 AM
Unknown Object (File)
Wed, Nov 13, 10:46 AM
Unknown Object (File)
Wed, Nov 13, 10:46 AM

Details

Summary

Allows for packaging of the grpc generated files, this allows for
downstream packages such as tunnelbroker to then find_package(comm-grpc)
and use the related targets and avoids needing to interact with
code generation logic.

Depends on D4294

Test Plan

nix build .#comm-grpc

Then inspect ./result

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Restore NativeModules.{h,cpp}

Their generation is a bit more involved with react-native

This revision is now accepted and ready to land.Jun 21 2022, 8:18 PM
This revision now requires review to proceed.Jun 21 2022, 8:18 PM
ashoat added inline comments.
native/cpp/CommonCpp/grpc/CMakeLists.txt
54 ↗(On Diff #13584)

Weird indentation here – can this close paren be unindented?

59 ↗(On Diff #13584)

Weird indentation here – can this close paren be unindented?

native/cpp/CommonCpp/grpc/cmake/FindGRPCComm.cmake
37 ↗(On Diff #13584)

Can this close paren get a newline?

nix/comm-grpc.nix
28 ↗(On Diff #13584)

Can we get rid of this extraneous newline?

This revision is now accepted and ready to land.Jun 22 2022, 10:48 AM

comments addressed

native/cpp/CommonCpp/grpc/CMakeLists.txt
54 ↗(On Diff #13584)

not sure why, but this is the default for vim settings, but it's probably just inheriting it from the line above

jon marked an inline comment as done.

Apply new header scheme

This revision now requires review to proceed.Jun 27 2022, 9:20 AM
native/cpp/CommonCpp/grpc/cmake/FindGRPCComm.cmake
34

Would be great if we could keep lines to 80 chars. Not sure how hard that is to do in this context, though. Some languages have weird quirks and so we generally don't worry about the 80 chars rule (Objective-C, bash)... should we consider CMake to be one of these languages?

max added inline comments.
native/cpp/CommonCpp/grpc/CMakeLists.txt
16

Not sure we need to iterate all of this in such a long comment. But I do not insist on it.

native/cpp/CommonCpp/grpc/cmake/FindGRPCComm.cmake
34
 ARGS 
--grpc_out=${CMAKE_CURRENT_BINARY_DIR} -I${FIL_DIR} 
--plugin=protoc-gen-grpc=${GRPC_CPP_PLUGIN} ${ABS_FIL}
This revision is now accepted and ready to land.Jun 30 2022, 8:24 AM

Don't attempt to generate the files with CMake, only export

Since I "backported" some of the header changes, these changes will no longer work in isolation

jon added inline comments.
native/cpp/CommonCpp/grpc/CMakeLists.txt
16

I'm not sure what the original line was sorry.

jon marked an inline comment as done.

Since I did a pretty fundamental change, please re-review

ashoat requested changes to this revision.Jul 3 2022, 11:53 AM

Repeating feedback I have left before. Please consider the meta-feedback I left in D4297... if you integrate feedback after the first time it's given to you, we can significantly reduce the number of cycles of review your diffs have to go through, and save both you and your reviewers some time

native/cpp/CommonCpp/grpc/CMakeLists.txt
9 ↗(On Diff #14106)

80 lines

16–41 ↗(On Diff #14106)

Weird indentation

This revision now requires changes to proceed.Jul 3 2022, 11:53 AM
jon marked an inline comment as done.

Address comments, lint

jon added inline comments.
native/cpp/CommonCpp/grpc/CMakeLists.txt
16–41 ↗(On Diff #14106)

This one looks right, it's in a loop, so the beginning of the statement is also indented

This revision is now accepted and ready to land.Jul 6 2022, 12:49 PM

Rename grpc projects to be unique from services

Update header references, as they refer to old paths

Avoid packaging grpc build with nix right now