Skip to content

Commit

Permalink
[c++] [c#] [grpc] Delete Bond-over-gRPC code
Browse files Browse the repository at this point in the history
Bond-over-gRPC is no longer supported.

Delete the Bond-over-gRPC code. Leave the Bond-over-gRPC documentation
for now so that anyone using the current version of Bond can still
reference it.

* Remove C++ and C# gRPC library code, tests, examples, and glue code.
* Remove support for gRPC codegen. gbc can still parse service
  definitions and emit them in JSON ASTs.
* Remove gRPC submodule.
* Remove gRPC-specific CI builds.
* Revise README.

See #1131
  • Loading branch information
chwarr authored Mar 8, 2022
1 parent d9fe6ec commit 81b2ef0
Show file tree
Hide file tree
Showing 162 changed files with 60 additions and 11,551 deletions.
1 change: 0 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
env:
- { FLAVOR: cs }
- { FLAVOR: cpp-core, BOOST: 1.66.0, COMPILER: clang }
- { FLAVOR: cpp-grpc, BOOST: 1.66.0, COMPILER: clang }
- { FLAVOR: hs }
- { FLAVOR: java }

Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/linux_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,13 @@ jobs:
- { FLAVOR: cpp-core, BOOST: 1.62.0, COMPILER: clang }
- { FLAVOR: cpp-core, BOOST: 1.61.0, COMPILER: clang }

- { FLAVOR: cpp-grpc, BOOST: 1.66.0, COMPILER: clang }
- { FLAVOR: cpp-grpc, BOOST: 1.65.1, COMPILER: clang }
- { FLAVOR: cpp-grpc, BOOST: 1.64.0, COMPILER: clang }
- { FLAVOR: cpp-grpc, BOOST: 1.63.0, COMPILER: clang }
- { FLAVOR: cpp-grpc, BOOST: 1.62.0, COMPILER: clang }
- { FLAVOR: cpp-grpc, BOOST: 1.61.0, COMPILER: clang }

- { FLAVOR: cpp-core, BOOST: 1.66.0, COMPILER: gcc }
- { FLAVOR: cpp-core, BOOST: 1.65.1, COMPILER: gcc }
- { FLAVOR: cpp-core, BOOST: 1.64.0, COMPILER: gcc }
- { FLAVOR: cpp-core, BOOST: 1.63.0, COMPILER: gcc }
- { FLAVOR: cpp-core, BOOST: 1.62.0, COMPILER: gcc }
- { FLAVOR: cpp-core, BOOST: 1.61.0, COMPILER: gcc }

- { FLAVOR: cpp-grpc, BOOST: 1.66.0, COMPILER: gcc }
- { FLAVOR: cpp-grpc, BOOST: 1.65.1, COMPILER: gcc }
- { FLAVOR: cpp-grpc, BOOST: 1.64.0, COMPILER: gcc }
- { FLAVOR: cpp-grpc, BOOST: 1.63.0, COMPILER: gcc }
- { FLAVOR: cpp-grpc, BOOST: 1.62.0, COMPILER: gcc }
- { FLAVOR: cpp-grpc, BOOST: 1.61.0, COMPILER: gcc }

env: ${{ matrix.env }}

steps:
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "thirdparty/grpc"]
path = thirdparty/grpc
url = https://github.com/grpc/grpc.git

[submodule "thirdparty/rapidjson"]
path = thirdparty/rapidjson
url = https://github.com/Tencent/rapidjson.git
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,39 @@ tag versions. The Bond compiler (`gbc`) and
different versioning scheme, following the Haskell community's
[package versioning policy](https://wiki.haskell.org/Package_versioning_policy).

## Unreleased ##

* IDL core version: TBD
* C++ version: TBD (major bump needed)
* C# NuGet version: TBD (major bump needed)
* `gbc` & compiler library: TBD (major bump needed)

### `gbc` and Bond compiler library ###
* **Breaking change**: Codegen for Bond-over-gRPC has been removed: the
`--grpc` switch is no longer supported. Service definitions are still
parsed, but codegen can no longer be done for C++ or C#. See [issue
\#1131, Bond-over-gRPC will be deprecated February
2022](https://github.com/microsoft/bond/issues/1131), for the full
announcement.

### C++ ###

* **Breaking change**: All Bond-over-gRPC code has been removed. This is
everything under the `bond::ext:grpc` namespace. Service definitions can
still appear in .bond files, but no C++ code will be generated for them.
See [issue \#1131, Bond-over-gRPC will be deprecated February
2022](https://github.com/microsoft/bond/issues/1131), for the full
announcement.

### C# ###

* **Breaking change**: All Bond-over-gRPC code has been removed. This is
everything under the `Bond.Grpc` namespace and the Bond.Grpc.CSharp NuGet
package. Service definitions can still appear in .bond files, but no C#
code will be generated for them. See [issue \#1131, Bond-over-gRPC will be
deprecated February 2022](https://github.com/microsoft/bond/issues/1131),
for the full announcement.

## 10.0: 2022-03-07 ##

* IDL core version: 3.0
Expand Down
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,9 @@ set (CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/cmake
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cmake-modules)

# Initialize before ThirdParty
set (BOND_ENABLE_GRPC
"TRUE"
CACHE BOOL "If FALSE, then do not build gRPC integration")
set (BOND_FIND_GRPC
"FALSE"
CACHE BOOL "If TRUE, search for an installed gRPC library; if FALSE, then build and use gRPC from the /thirdparty subdirectory")
set (BOND_FIND_RAPIDJSON
"FALSE"
CACHE BOOL "If FALSE, then use and install rapidjson from the /thirdparty subdirectory")
# We need to include third-party CMake modules before we configure our own
# settings so that we don't apply our settings to third-party code.
add_subdirectory (thirdparty)

enable_testing()

Expand Down
37 changes: 8 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ to build Bond you will need CMake (3.1+),
[Haskell Stack](https://docs.haskellstack.org/en/stable/README/#how-to-install)
(1.5.1+) and Boost (1.61+).

Additionally, Bond requires RapidJSON and optionally requires gRPC. The Bond repository primarily uses Git submodules for these two dependencies. It should be cloned with the `--recursive` flag:
Additionally, Bond requires RapidJSON. The Bond repository has a Git submodules for RapidJSON. It should be cloned with the `--recursive` flag:

```bash
git clone --recursive https://github.com/microsoft/bond.git
```

If you already have RapidJSON and would like to build against it, add argument `-DBOND_FIND_RAPIDJSON=TRUE` to the CMake invocation. It will use find_package(RapidJSON). If you do not provide a RapidJSON library, Bond will also install RapidJSON.

If you do not wish to build the gRPC component, add argument `-DBOND_ENABLE_GRPC=FALSE` to the CMake invocation.

Following are specific instructions for building on various platforms.

### Linux
Expand Down Expand Up @@ -81,22 +79,20 @@ In the root `bond` directory run:
```bash
mkdir build
cd build
cmake -DBOND_ENABLE_GRPC=FALSE ..
make
sudo make install
```

The `build` directory is just an example. Any directory can be used as the
build destination.

To build the Bond Python module, all the C++/Python tests and
examples, and Bond-over-gRPC, a few more packages are needed.
To build the Bond Python module and all the C++/Python tests and
examples, a few more packages are needed.

```bash
sudo apt-get install \
autoconf \
build-essential \
golang \
libboost-date-time-dev \
libboost-python-dev \
libboost-test-dev \
Expand All @@ -110,7 +106,6 @@ the new options.

```bash
cd build # or wherever you ran CMake before
cmake -DBOND_ENABLE_GRPC=TRUE -DgRPC_ZLIB_PROVIDER=package ..
```

Running the following command in the `build` directory will build and execute all
Expand Down Expand Up @@ -145,7 +140,6 @@ order to generate and build from makefiles, in the root `bond` directory run:
```bash
mkdir build
cd build
cmake -DBOND_ENABLE_GRPC=FALSE ..
make
sudo make install
```
Expand All @@ -154,7 +148,7 @@ Alternatively, you can generate Xcode projects by passing the `-G Xcode` option
to cmake:

```bash
cmake -DBOND_ENABLE_GRPC=FALSE -G Xcode ..
cmake -G Xcode ..
```

You can build and run unit tests by building the `check` target in Xcode or by
Expand Down Expand Up @@ -225,9 +219,9 @@ set BOOST_LIBRARYDIR=D:\boost_1_61_0\lib64-msvc-14.0
```

The core Bond library and most examples only require Boost headers. The
pre-built libraries are only needed for unit tests, Python, and gRPC
support. If Boost or Python libraries are not found on the system, then some
tests and examples will not be built.
pre-built libraries are only needed for unit tests, and Python. If Boost or
Python libraries are not found on the system, then some tests and examples
will not be built.

To generate a solution to build the Bond Core C++ and Python with Visual
Studio 2015 run the following commands from the root `bond` directory:
Expand All @@ -236,7 +230,7 @@ Studio 2015 run the following commands from the root `bond` directory:
mkdir build
cd build
set PreferredToolArchitecture=x64
cmake -DBOND_ENABLE_GRPC=FALSE -G "Visual Studio 14 2015 Win64" ..
cmake -G "Visual Studio 14 2015 Win64" ..
```

Setting `PreferredToolArchitecture=x64` selects the 64-bit toolchain which
Expand All @@ -259,21 +253,6 @@ To build and execute the unit tests and examples run:
cmake --build . --target check -- /maxcpucount:8
```

To build Bond's gRPC++ integration from source, some of
[gRPC's prerequisites](https://github.com/grpc/grpc/blob/master/INSTALL.md#building-using-cmake-with-boringssl)
are also needed:

```bash
choco install activeperl golang ninja yasm
```

You will also need to enable gRPC in the `cmake` configuration step by running the following
in the `build` directory from above and then following the other `cmake` commands above:

```bash
cmake -DBOND_ENABLE_GRPC=TRUE -G "Visual Studio 14 2015 Win64" ..
```

Alternatively, you can build and install Bond using the [vcpkg](https://github.com/microsoft/vcpkg/) dependency manager:

```batch
Expand Down
Loading

0 comments on commit 81b2ef0

Please sign in to comment.