Commit Graph

674 Commits

Author SHA1 Message Date
Craig Tiller 83a17ff468 [clang-format] Remove requirement that port_platform.h is at the top (#36275)
Closes #36275

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36275 from ctiller:port_platform-include-grpcpp-impl-clang-format 89c43491d0
PiperOrigin-RevId: 623178498
2024-04-09 09:08:28 -07:00
Craig Tiller 2bcca152cf [clang-format] Remove requirement that port_platform.h is at the top (#36277)
Closes #36277

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36277 from ctiller:port_platform-include-grpcpp-impl-codegen-clang-format 2670fb8c35
PiperOrigin-RevId: 623176416
2024-04-09 08:48:02 -07:00
AJ Heller 3d82c522fa [EventEngine] Refactor ServerCallbackCall to use EventEngine::Run (#36126)
This removes two Executor::Run dependencies, and requires that all ServerCallbackCall implementations implement the new `RunAsync` method. There's one other known other implementation of ServerCallbackCall that will need to be updated.

We could also support an "inefficient" path that uses the default engine (not implemented here), for all subclasses that do not want to update. As far as anyone is aware, the ServerCallbackCall class was never intended to be subclassed externally.

Closes #36126

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36126 from drfloob:server-callback-on-ee 6242a78a3f
PiperOrigin-RevId: 619621598
2024-03-28 17:34:00 +00:00
Mike Kruskal db51a3f69a Mark grpc generators for editions support.
Edition 2023 makes no changes to method/service descriptors, so these should be unaffected and already supported.

PiperOrigin-RevId: 615832918
2024-03-14 10:52:00 -07:00
Tanvi Jagtap 58300b9d1f Adding clang format file to each folder (#35727)
<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #35727

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35727 from tanvi-jagtap:tjagtap_2024_01_29_formatting_1005 b92d064158
PiperOrigin-RevId: 602963496
2024-01-31 00:58:09 -08:00
Tanvi Jagtap 00a35e24e5 Adding clang format file to each folder (#35736)
<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #35736

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35736 from tanvi-jagtap:tjagtap_formatting_1006 3a0a4125cf
PiperOrigin-RevId: 602601007
2024-01-29 21:55:59 -08:00
Craig Tiller 4e666c740b Internal change
PiperOrigin-RevId: 590780731
2023-12-13 20:06:30 -08:00
Tanvi Jagtap 8019903a44 Internal configuration cleanup
PiperOrigin-RevId: 590528536
2023-12-14 03:42:30 +00:00
h-vetinari 2d1595c9af
[Build] Shared builds on windows (#34103)
Towards https://github.com/grpc/grpc/issues/33032,

Reopen after botched force-push in #33175 that then got "merged" and
cannot be reopened anymore.

More context in that PR.

---------

Co-authored-by: Isuru Fernando <isuruf@gmail.com>
Co-authored-by: David Chamberlin <david.chamberlin@ln.email.gs.com>
2023-09-12 09:12:36 -07:00
Craig Tiller 76bd606bae
[build] Make GRPC_MUST_USE_RESULT default backed by nodiscard (#33742)
Going forward `[[nodiscard]]` is the portable way to spell this;
requires yanking a bunch of usage from after the param list to before.

We should further refine the GRPC_MUST_USE_RESULT macro to make it work
uniformly for any compilers that it doesn't today (most likely by making
it expand to nothing).

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-18 15:23:46 -07:00
Esun Kim c523bdac1e
[C++] Added a cord support to gRPC protobuf serializer (#32617)
As Protobuf is going to support Cord to reduce memory copy when
[de]serializing Cord fields, gRPC is going to leverage it. This
implementation is based on the internal one but it's slightly modified
to use the public APIs of Cord. only
2023-04-19 08:55:25 -07:00
Jan Tattermusch 0f1afec5a8
[protobuf] Upgrade third_party/protobuf to 22.x (#32606)
The very non-trivial upgrade of third_party/protobuf to 22.x
This PR strives to be as small as possible and many changes that were
compatible with protobuf 21.x and didn't have to be merged atomically
with the upgrade were already merged.
Due to the complexity of the upgrade, this PR wasn't created
automatically by a tool, but manually. Subsequent upgraded of
third_party/protobuf with our OSS release script should work again once
this change is merged.

This is best reviewed commit-by-commit, I tried to group changes in
logical areas.

Notable changes:
- the upgrade of third_party/protobuf submodule, the bazel protobuf
dependency itself
- upgrade of UPB dependency to 22.x (in the past, we used to always
upgrade upb to "main", but upb now has release branch as well). UPB
needs to be upgraded atomically with protobuf since there's a de-facto
circular dependency (new protobuf depends on new upb, which depends on
new protobuf for codegen).
- some protobuf and upb bazel rules are now aliases, so `
extract_metadata_from_bazel_xml.py` and `gen_upb_api_from_bazel_xml.py`
had to be modified to be able to follow aliases and reach the actual
aliased targets.
- some protobuf public headers were renamed, so especially
`src/compiler` needed to be updated to use the new headers.
- protobuf and upb now both depend on utf8_range project, so since we
bundle upb with grpc in some languages, we now have to bundle utf8_range
as well (hence changes in build for python, PHP, objC, cmake etc).
- protoc now depends on absl and utf8_range (previously protobuf had
absl dependency, but not for the codegen part), so python's
make_grpcio_tools.py required partial rewrite to be able to handle those
dependencies in the grpcio_tools build.
- many updates and fixes required for C++ distribtests (currently they
all pass, but we'll probably need to follow up, make protobuf's and
grpc's handling of dependencies more aligned and revisit the
distribtests)
- bunch of other changes mostly due to overhaul of protobuf's and upb's
internal build layout.

TODOs:
- [DONE] make sure IWYU and clang_tidy_code pass
- create a list of followups (e.g. work to reenable the few tests I had
to disable and to remove workaround I had to use)
- [DONE in cl/523706129] figure out problem(s) with internal import

---------

Co-authored-by: Craig Tiller <ctiller@google.com>
2023-04-12 18:43:58 +02:00
Yousuk Seung 6b31b8d346
Add MakeChannelArgumentOption() for void* (#32096) 2023-01-13 17:15:30 -08:00
Yijie Ma f99b8b5bc4
Convert c-style comments to C++-style comments (#31923)
* baseline

* fix clang-tidy

* manually revert these files

* manually fixup at eof

* revert 2 more files

* change check_deprecated_grpc++.py

* change end2end_defs.include template

* fix check_include_guards.py

* untrack tools/distrib/python/convert_cstyle_comments_to_cpp.py

not yet ready to be submitted

* fix

yapf check_include_guards.py
remove a space...

* fix version.cc.template

* fix version_info.h.template
2022-12-22 23:01:53 -08:00
Cheng-Yu Chung 1b05576aa3
[cleanups] Clean up `GrpcLibraryInitializer` (#31894)
* Clean up `GrpcLibraryInitializer`

* Update

* Automated change: Fix sanity tests
2022-12-17 01:08:35 +08:00
Cheng-Yu Chung e28419f1f9
[cleanups] Remove `class CoreCodegen` and `g_core_codegen_interface` (#31875)
* Delete `g_core_codegen_interface`

* Automated change: Fix sanity tests

* Fix

* Update
2022-12-14 23:47:13 +08:00
Cheng-Yu Chung 9a7e77318b
[cleanups] Remove `include/grpc/impl/codegen/grpc_types.h` (#31835)
* Remove `include/grpc/impl/codegen/grpc_types.h`

* Automated change: Fix sanity tests

* Fix typo

* Automated change: Fix sanity tests
2022-12-14 02:29:17 +08:00
Cheng-Yu Chung f03304b963
[cleanups] Remove functions in `class CoreCodegen` (#31837)
* Clean up `assert_fail()`

* Clean up `ok()` and `cancel()`

* Automated change: Fix sanity tests
2022-12-13 09:37:48 +08:00
Cheng-Yu Chung 2e9e6439f8
Remove `include/grpc/impl/codegen/connectivity_state.h` (#31728)
* Remove `include/grpc/impl/codegen/connectivity_state.h`

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests
2022-12-12 18:03:33 +08:00
Cheng-Yu Chung 4e90f43a75
Remove functions in `class CoreCodegen` (#31796)
* Update include

* Clean up `grpc_empty_slice()`

* Clean up `grpc_slice_malloc()`

* Clean up `grpc_slice_unref()`

* Clean up `grpc_slice_ref()`

* Clean up `grpc_slice_split_tail()`

* Clean up `grpc_slice_split_head()`

* Clean up `grpc_slice_sub()`

* Clean up `grpc_slice_buffer_add()`

* Clean up `grpc_slice_buffer_add_indexed()`

* Clean up `grpc_slice_buffer_pop()`

* Clean up `grpc_slice_from_static_buffer()`

* Clean up `grpc_slice_from_copied_buffer()`

* Clean up `grpc_metadata_array_init()`

* Clean up `grpc_metadata_array_destroy()`

* Clean up `gpr_inf_future()`

* Clean up `gpr_time_0()`
2022-12-07 18:55:47 +08:00
Cheng-Yu Chung 1d968a36aa
Remove functions in `class CoreCodegen` (#31767)
* Clean up `grpc_byte_buffer_copy()`

* Clean up `grpc_byte_buffer_destroy()`

* Clean up `grpc_byte_buffer_length()`

* Clean up `grpc_byte_buffer_reader_init()`

* Clean up `grpc_byte_buffer_reader_destroy()`

* Clean up `grpc_byte_buffer_reader_next()`

* Clean up `grpc_byte_buffer_reader_peek()`

* Clean up `grpc_raw_byte_buffer_create()`

* Clean up `grpc_slice_new_with_user_data()`

* Clean up `grpc_slice_new_with_len()`

* Clean up `grpc_call_start_batch()`

* Clean up `grpc_call_cancel_with_status()`

* Clean up `grpc_call_failed_before_recv_message()`

* Clean up `grpc_call_ref()`

* Clean up `grpc_call_unref()`

* Clean up `grpc_call_error_to_string()`

* Fix typos

* Automated change: Fix sanity tests
2022-12-03 05:27:42 +08:00
Cheng-Yu Chung 024a0f7388
Remove functions in `class CoreCodegen` (#31751)
* Clean up `grpc_completion_queue_factory_lookup()`

* Clean up `grpc_completion_queue_create()`

* Clean up `grpc_completion_queue_create_for_next()`

* Clean up `grpc_completion_queue_create_for_pluck()`

* Clean up `grpc_completion_queue_shutdown()`

* Clean up `grpc_completion_queue_destroy()`

* Clean up `grpc_completion_queue_pluck()`

* Clean up `gpr_malloc()`

* Clean up `gpr_free()`

* Clean up `grpc_init()`

* Clean up `grpc_shutdown()`

* Clean up `gpr_mu_init()`

* Clean up `gpr_mu_destroy()`

* Clean up `gpr_mu_lock()`

* Clean up `gpr_mu_unlock()`

* Clean up `gpr_cv_init()`

* Clean up `gpr_cv_destroy()`

* Clean up `gpr_cv_wait()`

* Clean up `gpr_cv_signal()`

* Remove `gpr_cv_broadcast()`
2022-11-29 21:54:14 +08:00
Cheng-Yu Chung 5498481265
Remove `include/grpcpp/impl/codegen/proto_utils.h` (#31532) 2022-11-29 21:33:55 +08:00
Cheng-Yu Chung c34d99fd9a
Remove `include/grpc/impl/codegen/compression_types.h` (#31726)
* Remove `include/grpc/impl/codegen/compression_types.h`

* Automated change: Fix sanity tests
2022-11-22 14:41:55 -05:00
Cheng-Yu Chung e9b287997a
Remove `include/grpcpp/impl/codegen/sync.h` (#31545)
* Remove `include/grpcpp/impl/codegen/sync.h`

* Fix sanity tests
2022-11-22 13:45:53 -05:00
Cheng-Yu Chung 452d026b7d
Remove `include/grpcpp/impl/codegen/interceptor_common.h` (#31530)
* Remove `include/grpcpp/impl/codegen/interceptor_common.h`

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests
2022-11-22 11:07:55 -05:00
Cheng-Yu Chung d5b285df95
Remove `include/grpcpp/impl/codegen/create_auth_context.h` (#31359)
* Remove `include/grpcpp/impl/codegen/create_auth_context.h`

* Update

* Automated change: Fix sanity tests
2022-11-21 23:06:10 -05:00
Cheng-Yu Chung e83d69bdf2
Remove `include/grpcpp/impl/codegen/metadata_map.h` (#31531)
* Remove `include/grpcpp/impl/codegen/metadata_map.h`

* Automated change: Fix sanity tests
2022-11-21 17:33:27 -05:00
Cheng-Yu Chung 224c72b524
Remove `include/grpcpp/impl/codegen/server_interface.h` (#31539) 2022-11-21 15:40:52 -05:00
Cheng-Yu Chung e7f9fb03f4
Remove `include/grpcpp/impl/codegen/server_callback_handlers.h` (#31533) 2022-11-21 11:40:58 -05:00
Cheng-Yu Chung 7e736c7a6b
Remove `include/grpcpp/impl/codegen/intercepted_channel.h` (#31529) 2022-11-18 17:16:21 -05:00
Cheng-Yu Chung a02cc7d88a
Remove `include/grpcpp/impl/codegen/delegating_channel.h` (#31495)
* Remove `include/grpcpp/impl/codegen/delegating_channel.h`

* Update

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests
2022-11-18 14:10:37 -05:00
Cheng-Yu Chung 405de7ac72
Remove `include/grpcpp/impl/codegen/status.h` (#31285)
* Remove `include/grpcpp/impl/codegen/status.h`

* Include removing status_code_enum

* Update

* Update

* Update zlib (#31356) (#31357)

To mitigate CVE-2022-37434

* Update

Co-authored-by: Mikhail Lappo <miklelappo@users.noreply.github.com>
2022-11-18 13:22:55 -05:00
Cheng-Yu Chung c91c2fbd1a
Remove `include/grpcpp/impl/codegen/completion_queue_tag.h` (#31320)
* Remove `include/grpcpp/impl/codegen/completion_queue_tag.h`

* Automated change: Fix sanity tests
2022-11-17 13:52:14 -05:00
Cheng-Yu Chung 47b9a57de9
Remove `g_glip` and `class GrpcLibraryInterface` (#30414)
* Remove `g_glip` and `class GrpcLibraryInterface`

* Update

* Update

* Update

* Automated change: Fix sanity tests (#20)

* Update

* Update

* Update

* Test

* Fix

* Revert "Test"

This reverts commit 2f5c77e98d.

* More fix

* More fix

* More fix

* Minor fix

* Revert "Minor fix"

This reverts commit 1ee3ae4da1.

* Revert "More fix"

This reverts commit 1fc234896b.

* Revert "More fix"

This reverts commit 851393c0e6.

* Revert "More fix"

This reverts commit ed342a51d0.

* Revert "Fix"

This reverts commit 286ad8e639.
2022-11-14 15:30:09 -05:00
Cheng-Yu Chung 37c6662919
Remove `include/grpcpp/impl/codegen/callback_common.h` (#31311)
* Remove `include/grpcpp/impl/codegen/callback_common.h`

* Update
2022-11-01 18:34:20 -04:00
Cheng-Yu Chung 08ee2a3487
Remove `include/grpcpp/impl/codegen/call_op_set.h` (#31310) 2022-10-31 22:33:35 -04:00
Cheng-Yu Chung e60140676a
Remove `include/grpcpp/impl/codegen/channel_interface.h` (#31312)
* Remove `include/grpcpp/impl/codegen/channel_interface.h`

* Update
2022-10-28 17:47:49 -04:00
Cheng-Yu Chung d6a050842a
Revert "Revert "Remove `include/grpcpp/impl/codegen/rpc_service_method.h` (#31277)" (#31317)" (#31322)
This reverts commit 8b8fcfdd0b.
2022-10-28 15:40:45 -04:00
Cheng-Yu Chung 9143627664
Remove `include/grpcpp/impl/codegen/security/auth_context.h` (#31292) 2022-10-26 11:39:47 -04:00
Cheng-Yu Chung c65348879a
Remove `include/grpcpp/impl/codegen/time.h` (#31290) 2022-10-25 17:46:44 -04:00
Cheng-Yu Chung 493b961dfb
Remove `include/grpcpp/impl/codegen/sync_stream.h` (#31289) 2022-10-24 18:01:12 -04:00
Cheng-Yu Chung f4b25ab837
Remove `include/grpcpp/impl/codegen/stub_options.h` (#31287) 2022-10-21 20:23:54 -04:00
Cheng-Yu Chung 34b1633944
Remove `include/grpcpp/impl/codegen/string_ref.h` (#31286) 2022-10-19 22:56:36 -04:00
Cheng-Yu Chung 8c7cb57c02
Revert "Revert "Revert "Remove `include/grpcpp/impl/codegen/status_code_enum.h`"" (#31391)" (#31396)
This reverts commit 7827868762.
2022-10-19 08:01:54 -07:00
Cheng-Yu Chung 7827868762
Revert "Revert "Remove `include/grpcpp/impl/codegen/status_code_enum.h`"" (#31391)
* Revert "Revert "Remove `include/grpcpp/impl/codegen/status_code_enum.h` (#31284)" (#31387)"

This reverts commit 1a9ce63199.

* Update
2022-10-18 18:26:05 -04:00
Cheng-Yu Chung 1a9ce63199
Revert "Remove `include/grpcpp/impl/codegen/status_code_enum.h` (#31284)" (#31387)
This reverts commit 3981105be6.

Co-authored-by: Alisha Nanda <alishananda@google.com>
2022-10-18 10:27:04 -07:00
Cheng-Yu Chung 3981105be6
Remove `include/grpcpp/impl/codegen/status_code_enum.h` (#31284) 2022-10-18 11:34:24 -04:00
Cheng-Yu Chung 0fbc4a715c
Remove `include/grpcpp/impl/codegen/service_type.h` (#31282) 2022-10-17 16:26:03 -04:00
Yash Tibrewal 2c98fe0119
SerializationTraits: Remove unnecessary 2nd template parameter (#31363) 2022-10-17 12:43:12 -07:00