From 4ea1574809b94031072a3520bed4c1de2727de65 Mon Sep 17 00:00:00 2001 From: Christopher Warrington Date: Wed, 23 Feb 2022 09:24:46 -0800 Subject: [PATCH] [c++][c#][grpc] Deprecate Bond-over-gRPC Microsoft ceased its direct investment in Bond-over-gRPC in December 2021. GitHub issue [#1131, Bond-over-gRPC will be deprecated February 2022][1], outlines a two-step removal process should no one in the community be interested in maintaining Bond-over-gRPC: 1. mark Bond-over-gRPC as deprecated in February 2022 and 2. delete the Bond-over-gRPC code in May 2022. No one in the community has expressed an interest in maintaining Bond-over-gRPC. Mark the Bond-over-gRPC code as deprecated using the `[[deprecated]]` attribute in C# and the `[Obsolete]` attribute in .NET, implementing step 1. * Add suppressions for the new errors this generates in test and example code. * Remove the weekly gRPC master branch build: it has been failing since April 2021. Fixes https://github.com/microsoft/bond/issues/1108 * Add note about deprecation in documentation. * Minor usability improvements to the Install-Boost.ps1 script. [1]: https://github.com/microsoft/bond/issues/1131 --- .github/workflows/linux_cron.yml | 2 -- CHANGELOG.md | 21 +++++++++++++++++-- README.md | 2 ++ cmake/Compiler.cmake | 12 +++++++++++ compiler/bond.cabal | 8 +++---- cpp/inc/bond/ext/grpc/abstract_service.h | 2 +- cpp/inc/bond/ext/grpc/basic_thread_pool.h | 2 +- cpp/inc/bond/ext/grpc/exception.h | 2 +- cpp/inc/bond/ext/grpc/io_manager.h | 2 +- cpp/inc/bond/ext/grpc/reflection.h | 2 +- cpp/inc/bond/ext/grpc/scheduler.h | 2 +- cpp/inc/bond/ext/grpc/server.h | 2 +- cpp/inc/bond/ext/grpc/service_collection.h | 2 +- cpp/inc/bond/ext/grpc/shared_unary_call.h | 2 +- cpp/inc/bond/ext/grpc/thread_pool.h | 4 ++-- cpp/inc/bond/ext/grpc/unary_call.h | 2 +- cpp/inc/bond/ext/grpc/unary_call_result.h | 2 +- cpp/inc/bond/ext/grpc/wait_callback.h | 2 +- cpp/inc/bond/ext/grpc/win_thread_pool.h | 2 +- cpp/test/compat/grpc/CMakeLists.txt | 6 ++++++ cpp/test/grpc/CMakeLists.txt | 7 +++++++ cs/src/grpc/Marshaller.cs | 1 + cs/src/grpc/Message.cs | 3 +++ cs/src/grpc/NothingCalls.cs | 2 ++ cs/src/grpc/Obsolete.cs | 13 ++++++++++++ .../grpc/client/GrpcCompatClient.csproj | 4 ++++ .../grpc/server/GrpcCompatServer.csproj | 4 ++++ .../grpc/shared/GrpcCompatShared.csproj | 4 ++++ cs/test/grpc/grpc.csproj | 4 ++++ doc/src/bond_over_grpc.md | 21 +++++++++++++++++++ doc/src/compiler.md | 6 ++++++ examples/cpp/grpc/async-server/CMakeLists.txt | 3 +++ examples/cpp/grpc/grpc_dll/CMakeLists.txt | 6 ++++++ .../grpc/grpc_static_library/CMakeLists.txt | 5 +++++ examples/cpp/grpc/helloworld/CMakeLists.txt | 2 ++ examples/cpp/grpc/pingpong/CMakeLists.txt | 2 ++ examples/cpp/grpc/scalar/CMakeLists.txt | 2 ++ .../linux/build_cpp-grpc-master.zsh | 14 ------------- tools/ci-scripts/windows/Install-Boost.ps1 | 8 +++---- 39 files changed, 151 insertions(+), 41 deletions(-) create mode 100644 cs/src/grpc/Obsolete.cs delete mode 100644 tools/ci-scripts/linux/build_cpp-grpc-master.zsh diff --git a/.github/workflows/linux_cron.yml b/.github/workflows/linux_cron.yml index 614fec24..83695711 100644 --- a/.github/workflows/linux_cron.yml +++ b/.github/workflows/linux_cron.yml @@ -45,8 +45,6 @@ jobs: - { FLAVOR: cpp-grpc, BOOST: 1.62.0, COMPILER: gcc } - { FLAVOR: cpp-grpc, BOOST: 1.61.0, COMPILER: gcc } - - { FLAVOR: cpp-grpc-master, BOOST: 1.66.0, COMPILER: clang } - env: ${{ matrix.env }} steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index faecceaf..18a2de8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,12 +14,21 @@ different versioning scheme, following the Haskell community's ## Unreleased ## * IDL core version: TBD -* C++ version: TBD (minor version bump needed) -* C# NuGet version: (minor version bump needed) +* C++ version: TBD (major version bump needed) +* C# NuGet version: TBD (major version bump needed) * `gbc` & compiler library: TBD ### C++ ### +* **Breaking change**: Bond-over-gRPC has been marked deprecated. + Bond-over-gRPC will be removed in the next major version of Bond. See + [issue \#1131, Bond-over-gRPC will be deprecated February + 2022](https://github.com/microsoft/bond/issues/1131), for the full + announcement. + * The `[[deprecated]]` attribute has been added to the `bond::ext::grpc` + namespace in every top-level Bond-over-gRPC++ header. This will cause + compiler warnings/errors for uses of Bond-over-gRPC++ that you may need + to handle. * Fixed multiple symbol definition for Win32Exception in `grpc/win_thread_pool.h`. ([Issue \#1129](https://github.com/microsoft/bond/issues/1129)) @@ -39,6 +48,14 @@ different versioning scheme, following the Haskell community's ### C# ### +* **Breaking change**: Bond-over-gRPC code has been marked deprecated. + Bond-over-gRPC will be removed in the next major version of Bond. See + [issue \#1131, Bond-over-gRPC will be deprecated February + 2022](https://github.com/microsoft/bond/issues/1131), for the full + announcement. + * The `[Obsolete]` attribute has been added to every public type in the + `Bond.Grpc` assembly. This will cause compiler warnings/errors for uses + of Bond-over-gRPC# that you may need to handle. * Added virtual method `OutputBuffer.ResizeBuffer` that can be overridden to use buffer allocators other than `new byte[]` (e.g. `ArrayPool.Rent()`). ([Pull request diff --git a/README.md b/README.md index 91bddf1b..3126dd8b 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ For details, see the User's Manuals: * [Java](https://microsoft.github.io/bond/manual/bond_java.html) * [Python](https://microsoft.github.io/bond/manual/bond_py.html) * [Bond-over-gRPC](https://microsoft.github.io/bond/manual/bond_over_grpc.html) + ([deprecated: will be removed in May + 2022](https://github.com/microsoft/bond/issues/1131)) * [`gbc`, the Bond compiler/codegen tool](https://microsoft.github.io/bond/manual/compiler.html) * See also [the compiler library](https://hackage.haskell.org/package/bond) that diff --git a/cmake/Compiler.cmake b/cmake/Compiler.cmake index e4ab0ef9..968db5bb 100644 --- a/cmake/Compiler.cmake +++ b/cmake/Compiler.cmake @@ -18,3 +18,15 @@ function (cxx_add_compile_options compiler) add_compile_options (${ARGV}) endif() endfunction() + +# TODO: remove when deleting Bond-over-gRPC code +function (cxx_target_no_warn_deprecated target) + # Need to ignore both the warning about not understanding [[deprecated]] + # and the warning about [[deprecated]] things if the compiler _does_ + # understand [[deprecated]] + cxx_target_compile_options (AppleClang ${target} PRIVATE -Wno-unknown-attributes -Wno-deprecated-declarations -Wno-c++14-extensions) + cxx_target_compile_options (Clang ${target} PRIVATE -Wno-unknown-attributes -Wno-deprecated-declarations -Wno-c++14-extensions) + cxx_target_compile_options (GNU ${target} PRIVATE -Wno-attributes -Wno-deprecated-declarations) + + cxx_target_compile_options (MSVC ${target} PRIVATE /wd4996) +endfunction() diff --git a/compiler/bond.cabal b/compiler/bond.cabal index 7732ef38..c82b1f0c 100644 --- a/compiler/bond.cabal +++ b/compiler/bond.cabal @@ -1,10 +1,10 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack -- --- hash: 5f829cf187d9630385924b752fae193c51da82b2d9bfc0ef8f38f23a638fc604 +-- hash: b3e1e8755f812c54ff2252111e7b261404f305c68fbcdde72babcd762faf6acb name: bond version: 0.12.1.0 @@ -89,7 +89,7 @@ executable gbc Options Paths_bond hs-source-dirs: - ./. + ./ build-depends: aeson , async @@ -130,7 +130,7 @@ test-suite gbc-tests Options hs-source-dirs: tests - ./. + ./ build-depends: Diff , HUnit diff --git a/cpp/inc/bond/ext/grpc/abstract_service.h b/cpp/inc/bond/ext/grpc/abstract_service.h index f3b895c5..9e739126 100644 --- a/cpp/inc/bond/ext/grpc/abstract_service.h +++ b/cpp/inc/bond/ext/grpc/abstract_service.h @@ -5,7 +5,7 @@ #include -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { namespace detail { diff --git a/cpp/inc/bond/ext/grpc/basic_thread_pool.h b/cpp/inc/bond/ext/grpc/basic_thread_pool.h index bca5efd8..4e1c32eb 100644 --- a/cpp/inc/bond/ext/grpc/basic_thread_pool.h +++ b/cpp/inc/bond/ext/grpc/basic_thread_pool.h @@ -27,7 +27,7 @@ #include #include -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { /// @brief Basic thread pool implementation. class basic_thread_pool diff --git a/cpp/inc/bond/ext/grpc/exception.h b/cpp/inc/bond/ext/grpc/exception.h index 7495cd2a..87ab1dc9 100644 --- a/cpp/inc/bond/ext/grpc/exception.h +++ b/cpp/inc/bond/ext/grpc/exception.h @@ -10,7 +10,7 @@ #include #include -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { /// @brief %Exception thrown to indicate that a callback has been /// invoked multiple times when only one invocation is expected. diff --git a/cpp/inc/bond/ext/grpc/io_manager.h b/cpp/inc/bond/ext/grpc/io_manager.h index 9edc5ec0..697d2c26 100644 --- a/cpp/inc/bond/ext/grpc/io_manager.h +++ b/cpp/inc/bond/ext/grpc/io_manager.h @@ -36,7 +36,7 @@ #include #include -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { namespace detail { diff --git a/cpp/inc/bond/ext/grpc/reflection.h b/cpp/inc/bond/ext/grpc/reflection.h index a14737c0..795b2a4c 100644 --- a/cpp/inc/bond/ext/grpc/reflection.h +++ b/cpp/inc/bond/ext/grpc/reflection.h @@ -7,7 +7,7 @@ #include -namespace bond { namespace ext { namespace grpc { namespace reflection { +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { namespace reflection { /// @brief Method description in compile-time schema diff --git a/cpp/inc/bond/ext/grpc/scheduler.h b/cpp/inc/bond/ext/grpc/scheduler.h index 91b1de49..094df02d 100644 --- a/cpp/inc/bond/ext/grpc/scheduler.h +++ b/cpp/inc/bond/ext/grpc/scheduler.h @@ -7,7 +7,7 @@ #include -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { #ifdef BOND_DOXYGEN_ONLY diff --git a/cpp/inc/bond/ext/grpc/server.h b/cpp/inc/bond/ext/grpc/server.h index 5a0ccbf3..167b7592 100644 --- a/cpp/inc/bond/ext/grpc/server.h +++ b/cpp/inc/bond/ext/grpc/server.h @@ -70,7 +70,7 @@ #include #include -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { /// @brief Models a grpc server powered by Bond services. /// diff --git a/cpp/inc/bond/ext/grpc/service_collection.h b/cpp/inc/bond/ext/grpc/service_collection.h index 3e4a181d..437d8521 100644 --- a/cpp/inc/bond/ext/grpc/service_collection.h +++ b/cpp/inc/bond/ext/grpc/service_collection.h @@ -14,7 +14,7 @@ #include #include -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { /// @brief A collection of services that is used to construct a server. class service_collection final diff --git a/cpp/inc/bond/ext/grpc/shared_unary_call.h b/cpp/inc/bond/ext/grpc/shared_unary_call.h index 34f2c7e9..0842e4a8 100644 --- a/cpp/inc/bond/ext/grpc/shared_unary_call.h +++ b/cpp/inc/bond/ext/grpc/shared_unary_call.h @@ -10,7 +10,7 @@ #include -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { /// @brief A shared owner of the details of a single async, unary call. /// diff --git a/cpp/inc/bond/ext/grpc/thread_pool.h b/cpp/inc/bond/ext/grpc/thread_pool.h index 97e6bef5..c9650997 100644 --- a/cpp/inc/bond/ext/grpc/thread_pool.h +++ b/cpp/inc/bond/ext/grpc/thread_pool.h @@ -9,7 +9,7 @@ #include "win_thread_pool.h" -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { using thread_pool = win_thread_pool; @@ -19,7 +19,7 @@ namespace bond { namespace ext { namespace grpc #include "basic_thread_pool.h" -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { using thread_pool = basic_thread_pool; diff --git a/cpp/inc/bond/ext/grpc/unary_call.h b/cpp/inc/bond/ext/grpc/unary_call.h index 4ea5264a..e555f4e6 100644 --- a/cpp/inc/bond/ext/grpc/unary_call.h +++ b/cpp/inc/bond/ext/grpc/unary_call.h @@ -11,7 +11,7 @@ #include -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { template class shared_unary_call; diff --git a/cpp/inc/bond/ext/grpc/unary_call_result.h b/cpp/inc/bond/ext/grpc/unary_call_result.h index 213db4c5..a8a3d02b 100644 --- a/cpp/inc/bond/ext/grpc/unary_call_result.h +++ b/cpp/inc/bond/ext/grpc/unary_call_result.h @@ -14,7 +14,7 @@ #include -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { /// @brief The client-side results of a unary call. template diff --git a/cpp/inc/bond/ext/grpc/wait_callback.h b/cpp/inc/bond/ext/grpc/wait_callback.h index ad8a9474..9c905d7c 100644 --- a/cpp/inc/bond/ext/grpc/wait_callback.h +++ b/cpp/inc/bond/ext/grpc/wait_callback.h @@ -19,7 +19,7 @@ #include -namespace bond { namespace ext { namespace grpc { +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { /// @brief A callback type that can be manually waited upon. /// diff --git a/cpp/inc/bond/ext/grpc/win_thread_pool.h b/cpp/inc/bond/ext/grpc/win_thread_pool.h index 8d087882..826e3f31 100644 --- a/cpp/inc/bond/ext/grpc/win_thread_pool.h +++ b/cpp/inc/bond/ext/grpc/win_thread_pool.h @@ -21,7 +21,7 @@ #include #include -namespace bond { namespace ext { namespace grpc +namespace bond { namespace ext { namespace [[deprecated("Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131")]] grpc { namespace detail { diff --git a/cpp/test/compat/grpc/CMakeLists.txt b/cpp/test/compat/grpc/CMakeLists.txt index 57002ec2..fa398946 100644 --- a/cpp/test/compat/grpc/CMakeLists.txt +++ b/cpp/test/compat/grpc/CMakeLists.txt @@ -19,6 +19,8 @@ add_dependencies(cpp_grpc_compat_codegen_lib cpp_grpc_compat_codegen) target_compile_definitions (cpp_grpc_compat_codegen_lib PUBLIC -DBOND_COMPACT_BINARY_PROTOCOL -DBOND_FAST_BINARY_PROTOCOL) +# Supress warning about [[deprecated]] Bond-over-gRPC code. +cxx_target_no_warn_deprecated (cpp_grpc_compat_codegen_lib) # server and client executables add_bond_executable (cpp_grpc_compat_server GRPC EXCLUDE_FROM_ALL @@ -37,6 +39,10 @@ cxx_target_compile_definitions (MSVC cpp_grpc_compat_server PRIVATE cxx_target_compile_definitions (MSVC cpp_grpc_compat_client PRIVATE -D_WIN32_WINNT=0x0600) +# Supress warning about [[deprecated]] Bond-over-gRPC code. +cxx_target_no_warn_deprecated (cpp_grpc_compat_server) +cxx_target_no_warn_deprecated (cpp_grpc_compat_client) + target_compile_definitions (grpc_compatibility_test PRIVATE -DBOND_COMPACT_BINARY_PROTOCOL -DBOND_FAST_BINARY_PROTOCOL) diff --git a/cpp/test/grpc/CMakeLists.txt b/cpp/test/grpc/CMakeLists.txt index 55fd1add..ebb262d0 100644 --- a/cpp/test/grpc/CMakeLists.txt +++ b/cpp/test/grpc/CMakeLists.txt @@ -26,6 +26,9 @@ function (add_unit_test) cxx_target_compile_options (Clang ${name} PRIVATE -DBOOST_ASIO_HAS_STD_CHRONO) cxx_target_compile_options (AppleClang ${name} PRIVATE -DBOOST_ASIO_HAS_STD_CHRONO) + + # Supress warning about [[deprecated]] Bond-over-gRPC code. + cxx_target_no_warn_deprecated (${name}) endfunction() @@ -35,6 +38,8 @@ add_target_to_folder (grpc_test_common) target_include_directories (grpc_test_common PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}) +# Supress warning about [[deprecated]] Bond-over-gRPC code. +cxx_target_no_warn_deprecated (grpc_test_common) target_link_libraries (grpc_test_common PUBLIC ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} grpc++) @@ -57,6 +62,8 @@ target_include_directories (grpc_test_services PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}) cxx_target_compile_options (MSVC grpc_test_services PRIVATE -D_WIN32_WINNT=0x0600) +# Supress warning about [[deprecated]] Bond-over-gRPC code. +cxx_target_no_warn_deprecated (grpc_test_services) target_link_libraries(grpc_test_services PRIVATE bond grpc++) add_dependencies(grpc_test_services grpc_test_services_codegen) diff --git a/cs/src/grpc/Marshaller.cs b/cs/src/grpc/Marshaller.cs index 2c56b2c6..1e3e2ce1 100644 --- a/cs/src/grpc/Marshaller.cs +++ b/cs/src/grpc/Marshaller.cs @@ -8,6 +8,7 @@ namespace Bond.Grpc using Bond.IO.Unsafe; using Bond.Protocols; + [Obsolete(message: ObsoleteMessage.Value, error: false)] public static class Marshaller { static Marshaller() diff --git a/cs/src/grpc/Message.cs b/cs/src/grpc/Message.cs index c68655de..c451c16b 100644 --- a/cs/src/grpc/Message.cs +++ b/cs/src/grpc/Message.cs @@ -9,6 +9,7 @@ namespace Bond.Grpc /// Interface representing a Bond message of a specific payload type. /// /// The type of the message payload. + [Obsolete(message: ObsoleteMessage.Value, error: false)] public interface IMessage { /// @@ -31,6 +32,7 @@ namespace Bond.Grpc /// /// Factory methods for creating instances. /// + [Obsolete(message: ObsoleteMessage.Value, error: false)] public static class Message { /// @@ -99,6 +101,7 @@ namespace Bond.Grpc /// A Bond message of a given type /// /// The type of the message payload. + [Obsolete(message: ObsoleteMessage.Value, error: false)] public class Message : IMessage { /// diff --git a/cs/src/grpc/NothingCalls.cs b/cs/src/grpc/NothingCalls.cs index e54f5899..ca877189 100644 --- a/cs/src/grpc/NothingCalls.cs +++ b/cs/src/grpc/NothingCalls.cs @@ -17,6 +17,7 @@ namespace Bond.Grpc.Internal /// considered part of Bond's public API surface. They may change at /// any time for any reason. /// + [Obsolete(message: ObsoleteMessage.Value, error: false)] public static class NothingCallInvoker { /// @@ -75,6 +76,7 @@ namespace Bond.Grpc.Internal /// considered part of Bond's public API surface. They may change at /// any time for any reason. /// + [Obsolete(message: ObsoleteMessage.Value, error: false)] public static class NothingCallHandler { /// diff --git a/cs/src/grpc/Obsolete.cs b/cs/src/grpc/Obsolete.cs new file mode 100644 index 00000000..7964cc70 --- /dev/null +++ b/cs/src/grpc/Obsolete.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Bond.Grpc +{ + using System; + + [Obsolete(message: Value, error: false)] + internal static class ObsoleteMessage + { + internal const string Value = "Bond-over-gRPC will be removed in the next major version of Bond. See https://github.com/microsoft/bond/issues/1131"; + } +} \ No newline at end of file diff --git a/cs/test/compat/grpc/client/GrpcCompatClient.csproj b/cs/test/compat/grpc/client/GrpcCompatClient.csproj index 9a02f0a9..c926bb02 100644 --- a/cs/test/compat/grpc/client/GrpcCompatClient.csproj +++ b/cs/test/compat/grpc/client/GrpcCompatClient.csproj @@ -8,6 +8,10 @@ GrpcCompatClient net45 + + + 618;$(NoWarn) + diff --git a/cs/test/compat/grpc/server/GrpcCompatServer.csproj b/cs/test/compat/grpc/server/GrpcCompatServer.csproj index 6ec76277..368c3027 100644 --- a/cs/test/compat/grpc/server/GrpcCompatServer.csproj +++ b/cs/test/compat/grpc/server/GrpcCompatServer.csproj @@ -8,6 +8,10 @@ GrpcCompatServer net45 + + + 618;$(NoWarn) + diff --git a/cs/test/compat/grpc/shared/GrpcCompatShared.csproj b/cs/test/compat/grpc/shared/GrpcCompatShared.csproj index 977b341b..36054ab3 100644 --- a/cs/test/compat/grpc/shared/GrpcCompatShared.csproj +++ b/cs/test/compat/grpc/shared/GrpcCompatShared.csproj @@ -8,6 +8,10 @@ GrpcCompatShared net45 + + + 618;$(NoWarn) + diff --git a/cs/test/grpc/grpc.csproj b/cs/test/grpc/grpc.csproj index 69a31383..5594e484 100644 --- a/cs/test/grpc/grpc.csproj +++ b/cs/test/grpc/grpc.csproj @@ -22,6 +22,10 @@ $(OutputPath)\Fields\ --collection-interfaces --fields --grpc + + + 618;$(NoWarn) + diff --git a/doc/src/bond_over_grpc.md b/doc/src/bond_over_grpc.md index 4abe223b..e72b4080 100644 --- a/doc/src/bond_over_grpc.md +++ b/doc/src/bond_over_grpc.md @@ -5,6 +5,27 @@ Bond-over-gRPC provides code generation from Bond IDL service definitions to send Bond objects via [gRPC](http://www.grpc.io/). +**Bond-over-gRPC is deprecated and will be completely removed from Bond in +May 2022.** See GitHub issue [\#1131, Bond-over-gRPC will be deprecated +February 2022](https://github.com/microsoft/bond/issues/1131), for full +details. + +If you are looking for something similar in spirit to Bond-over-gRPC, we recommend the following. + +* For C++, gRPC++ now supports a [callback-based asynchronous + API](https://github.com/grpc/proposal/pull/180) like Bond-over-gRPC’s. + Check out the + [client](https://github.com/grpc/grpc/blob/master/examples/cpp/helloworld/greeter_callback_client.cc) + and + [server](https://github.com/grpc/grpc/blob/master/examples/cpp/helloworld/greeter_callback_server.cc) + examples. +* For C# and .NET, we recommend [gRPC for + .NET](https://github.com/grpc/grpc-dotnet/). The Grpc.Core library that + Bond-over-gRPC is built atop [will no longer be supported as of May + 2022](https://grpc.io/blog/grpc-csharp-future/). +* Both gRPC++ and gRPC for .NET support pluggable serialization formats, so + you can use them with Bond, JSON, Protocol Buffers, or anything else. + # Features # ## Defining Services ## diff --git a/doc/src/compiler.md b/doc/src/compiler.md index 40bf7027..1ca2e231 100644 --- a/doc/src/compiler.md +++ b/doc/src/compiler.md @@ -265,6 +265,12 @@ See example: `examples/cpp/core/schema_view` Service definition ------------------ +**Bond-over-gRPC is deprecated and will be completely removed from Bond in +May 2022.** See GitHub issue [\#1131, Bond-over-gRPC will be deprecated +February 2022](https://github.com/microsoft/bond/issues/1131), for full +details. `gbc` will still be able to parse service definitions and emit them +in JSON AST, but C++ and C# codegen will be removed in May 2022. + A service definition consists of a service name and methods: ``` diff --git a/examples/cpp/grpc/async-server/CMakeLists.txt b/examples/cpp/grpc/async-server/CMakeLists.txt index 7b8f0474..20e99ded 100644 --- a/examples/cpp/grpc/async-server/CMakeLists.txt +++ b/examples/cpp/grpc/async-server/CMakeLists.txt @@ -2,6 +2,9 @@ add_bond_test (grpc-async-server async-server.bond async-server.cpp GRPC) cxx_target_compile_definitions (MSVC grpc-async-server PRIVATE -D_WIN32_WINNT=0x0600) +# Supress warning about [[deprecated]] Bond-over-gRPC code. +cxx_target_no_warn_deprecated (grpc-async-server) + if (BOND_FIND_GRPC) find_package(grpc CONFIG REQUIRED) target_link_libraries(grpc-async-server PRIVATE gRPC::grpc++) diff --git a/examples/cpp/grpc/grpc_dll/CMakeLists.txt b/examples/cpp/grpc/grpc_dll/CMakeLists.txt index 15db5421..340d7ebc 100644 --- a/examples/cpp/grpc/grpc_dll/CMakeLists.txt +++ b/examples/cpp/grpc/grpc_dll/CMakeLists.txt @@ -29,6 +29,9 @@ target_link_libraries (grpc_dll_example_lib PUBLIC cxx_target_compile_definitions (MSVC grpc_dll_example_lib PRIVATE -D_WIN32_WINNT=0x0600) +# Supress warning about [[deprecated]] Bond-over-gRPC code. +cxx_target_no_warn_deprecated (grpc_dll_example_lib) + add_bond_test (grpc_dll_example using_grpc_dll.cpp) @@ -41,3 +44,6 @@ target_link_libraries (grpc_dll_example PUBLIC cxx_target_compile_definitions (MSVC grpc_dll_example PRIVATE -D_WIN32_WINNT=0x0600) + +# Supress warning about [[deprecated]] Bond-over-gRPC code. +cxx_target_no_warn_deprecated (grpc_dll_example) diff --git a/examples/cpp/grpc/grpc_static_library/CMakeLists.txt b/examples/cpp/grpc/grpc_static_library/CMakeLists.txt index e69f89b4..43ad9b2e 100644 --- a/examples/cpp/grpc/grpc_static_library/CMakeLists.txt +++ b/examples/cpp/grpc/grpc_static_library/CMakeLists.txt @@ -42,3 +42,8 @@ cxx_target_compile_definitions (MSVC grpc_static_library_server PRIVATE cxx_target_compile_definitions (MSVC grpc_static_library_client PRIVATE -D_WIN32_WINNT=0x0600) + +# Supress warning about [[deprecated]] Bond-over-gRPC code. +cxx_target_no_warn_deprecated (grpc_static_library_lib) +cxx_target_no_warn_deprecated (grpc_static_library_server) +cxx_target_no_warn_deprecated (grpc_static_library_client) diff --git a/examples/cpp/grpc/helloworld/CMakeLists.txt b/examples/cpp/grpc/helloworld/CMakeLists.txt index 9d4093ce..ca12b862 100644 --- a/examples/cpp/grpc/helloworld/CMakeLists.txt +++ b/examples/cpp/grpc/helloworld/CMakeLists.txt @@ -1,6 +1,8 @@ add_bond_test (grpc-helloworld helloworld.bond helloworld.cpp GRPC) cxx_target_compile_definitions (MSVC grpc-helloworld PRIVATE -D_WIN32_WINNT=0x0600) +# Supress warning about [[deprecated]] Bond-over-gRPC code. +cxx_target_no_warn_deprecated (grpc-helloworld) if (BOND_FIND_GRPC) find_package(grpc CONFIG REQUIRED) diff --git a/examples/cpp/grpc/pingpong/CMakeLists.txt b/examples/cpp/grpc/pingpong/CMakeLists.txt index 2ded6da6..560c90a5 100644 --- a/examples/cpp/grpc/pingpong/CMakeLists.txt +++ b/examples/cpp/grpc/pingpong/CMakeLists.txt @@ -1,6 +1,8 @@ add_bond_test (grpc-pingpong pingpong.bond pingpong.cpp GRPC) cxx_target_compile_definitions (MSVC grpc-pingpong PRIVATE -D_WIN32_WINNT=0x0600) +# Supress warning about [[deprecated]] Bond-over-gRPC code. +cxx_target_no_warn_deprecated (grpc-pingpong) if (BOND_FIND_GRPC) find_package(grpc CONFIG REQUIRED) diff --git a/examples/cpp/grpc/scalar/CMakeLists.txt b/examples/cpp/grpc/scalar/CMakeLists.txt index 208521bc..e2ece665 100644 --- a/examples/cpp/grpc/scalar/CMakeLists.txt +++ b/examples/cpp/grpc/scalar/CMakeLists.txt @@ -1,6 +1,8 @@ add_bond_test (grpc-scalar scalar.bond scalar.cpp GRPC) cxx_target_compile_definitions (MSVC grpc-scalar PRIVATE -D_WIN32_WINNT=0x0600) +# Supress warning about [[deprecated]] Bond-over-gRPC code. +cxx_target_no_warn_deprecated (grpc-scalar) if (BOND_FIND_GRPC) find_package(grpc CONFIG REQUIRED) diff --git a/tools/ci-scripts/linux/build_cpp-grpc-master.zsh b/tools/ci-scripts/linux/build_cpp-grpc-master.zsh deleted file mode 100644 index a7de59e5..00000000 --- a/tools/ci-scripts/linux/build_cpp-grpc-master.zsh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/zsh - -set -eux - -# Get gRPC's current master -pushd "$BOND_ROOT/thirdparty/grpc" -git fetch origin master -git checkout origin/master -git submodule sync --recursive -git submodule update --init --recursive -popd - -BOND_CMAKE_FLAGS="$BOND_CMAKE_FLAGS -DBOND_SKIP_GBC_TESTS=TRUE -DBOND_SKIP_CORE_TESTS=TRUE -DgRPC_ZLIB_PROVIDER=package" -source "$BUILD_SCRIPTS/build_cpp-common.zsh" diff --git a/tools/ci-scripts/windows/Install-Boost.ps1 b/tools/ci-scripts/windows/Install-Boost.ps1 index c7af1fc7..e44b17bc 100644 --- a/tools/ci-scripts/windows/Install-Boost.ps1 +++ b/tools/ci-scripts/windows/Install-Boost.ps1 @@ -95,9 +95,9 @@ mkdir $lib64Dir | Out-Null function Install-BoostHeaders { - Write-Progress -Activity 'Installing Boost' -Status "Installing 'boost' (headers)" + Write-Progress -Activity 'Installing Boost' -Status "Installing 'boost' (headers) version $Version" - if ($PSCmdlet.ShouldProcess('boost', 'Install NuGet package')) + if ($PSCmdlet.ShouldProcess("boost version $Version", 'Install NuGet package')) { Install-NuGetPackage ` -PackageId 'boost' ` @@ -114,9 +114,9 @@ function Install-BoostComponent([string]$Component) { $packageId = "$Component-vc$(ConvertVcToolsetVer-ToBoostPackageFormat $VcToolsetVer)" - Write-Progress -Activity 'Installing Boost' -Status "Installing '$packageId'" + Write-Progress -Activity 'Installing Boost' -Status "Installing '$packageId' version $Version" - if ($PSCmdlet.ShouldProcess($packageId, 'Install NuGet package')) + if ($PSCmdlet.ShouldProcess("$packageId version $Version", 'Install NuGet package')) { Install-NuGetPackage ` -PackageId $packageId `