Previously, when when an official release of Bond was produced, a
Microsoft-internal key instead of bond.snk was used to strong-name sign
the assemblies. This means that locally produced assemblies and
Microsoft-produced assemblies have different strong names, making it
difficult to consume non-official releases in applications that require
strong-name signed assemblies.
This change switches to using bond.snk for all strong-name signing.
Official Microsoft release will still be Authenticode signed for
integrity. (Official release of Bond are already Authenticode signed.)
This is a breaking change, as it will change the strong name of the
assemblies.
Resolves https://github.com/Microsoft/bond/issues/414
Service inheritance syntax is disabled by default and can be enabled
using `--enable-service-inheritance` compiler switch.
Until code generation templates are updated to support service
inheritance the compiler will fail if `--grpc` or `--comm` options is
specified and the schema contains any service with a base.
Add syntax for inheritance in service definitions, e.g.:
service Foo
{
Result foo(Param);
}
service Bar : Foo
{
Result bar(Param);
}
In the AST a service base is represented as `Maybe Type`, the same way
as struct bases are represented. The parser validates that only a
concrete service or an instance of a generic service is used as a
base.
Commit fd9a186676 switched from boost::integral_constant to
std::integral_constant, but didn't make a clean break. With this change,
everything now uses std::integral_constant.
v1.1 addresses warning from Clang. Also, fix some issues in VC++ that the
upgrade exposed, specifically:
* Unreachable code warnings
* Conflicts due to mix/max macros in windef.h
* Warning due to converting enum to uint16_t
`bond::customize<protocols>` has been removed. All the public APIs that require a protocol list (e.g. `bond::Marshal`) now accept an extra template argument `Protocols` which defaults to `bond::BuiltInProtocols`. Custom input streams now require `bond::type_id<>` to be specialized with a unique magic number.
Closes https://github.com/Microsoft/bond/pull/425
The ClientContext is now passed back in the proxy's callback so that it
can be inspected after the response has been received.
Due to the larger number of items now being passed to the callback, the
struct unary_call_result has been introduced to bundle these together.
* Simplify lifetime management of ClientContext by having
unary_call_data own shared_ptr<ClientContext> instead of just taking
ClientContext *.
* Generate overloads without a ClientContext parameter that construct
one for the caller to simplify the common case.
* Documentation and examples used to demonstrate use of ClientContext.
When a `bond::ext::gRPC::server` is shutting down, it may need to send
responses to in-flight calls. To send these responses is needs an active
`io_manager`.
Before, `server::Shutdown()` also shut down the io_manager, which caused
in-flight calls to trigger the assert `!cqd->shutdown_called` inside of
gRPC's completion_queue.c (around line 500).
Now, we delay shutting down the `io_manager` until the server has been
completely shutdown and drained of existing work.
There was a race between completion of sending a response (initiated by
`unary_call::Finish()` or `unary_call::FinishWithError()`) and
`unary_call::~unary_call()`.
The state backing `unary_call` (which is needed to send a response as
well) was stored in an instance of `unary_call_impl`. When
`unary_call::Finish()` or `unary_call::FinishWithError()` was called,
the response was enqueued with gRPC to be sent, referencing members of
`unary_call_impl`. When the response had finished being sent and gRPC no
longer needed to reference the members, `unary_call_impl::invoke()` was
called. The old behavior was to have `unary_call_impl` then delete
itself. That was not correct: the state inside of `unary_call_impl` is
needed while both 1) the response is being sent and 2) there is a
`unary_call` instance alive.
If the response was sent and `unary_call_impl::invoke()` was called
BEFORE the `unary_call` instance was destroyed, `unary_call` ended up
accessing the now-deleted `unary_call_impl` instance.
The new behavior is to have `unary_call` and `unary_call_impl`
participate in shared ownership, so the backing `unary_call_impl` will
remain alive as long as the `unary_call` instance is alive OR the
response is being sent.
ClientAsyncResponseReader had a breaking API change that we needed to
adjust to.
The gRPC zlib submodule is now conflicting with the system-wide zlib.
When using CMake inside of Travis, we prefer the system-wide zlib
package over the submodule.
There also appears to be a bug with ClientAsyncResponseReader's
placement new and placement delete operators, so we're consuming a
slightly patched version (see
https://github.com/chwarr/grpc/commit/8bd0fb92ec for the delta).
Upstream issue https://github.com/grpc/grpc/issues/11301 has been opened
about this problem.
The unspecialized custom stream inferface functions that exist solely to
describe the interface have static asserts that are always false.
However, they are also non-void functions that have no return
statements. g++ 5.4.0 emits a warning about the lack of a return
statement. It apparently cannot see that the static assert is always
false. BOND_NORETURN is used to indicate that these methods don't
actually ever return anything.
- client-side, overload methods without bonded are generated
- server-side, Finish has an overload without bonded
- server-side, Finish's status paramater defaults to Status::OK
* Add an explicit section about default values
* Be explicit about what field types can have explicit vs. implicit vs.
nothing default values.
* Improve cross-references.
* Copy relevant sections for C++ manual to C# manual. (This is the best
we can do until we switch to something that let's us import section
into multiple pages.
Closes https://github.com/Microsoft/bond/issues/464
The wait_callback helper can be used with the generated gRPC proxies to
synchronously wait for the proxy callback to be invoked.
* helloworld updated to use wait_callback
* gRPC compat client updated to use wait_callback
* unit tests added
* Only load git submodules when they are needed.
* Remove redundant .NET Core build.
* Start slowest configurations first to reduce overall turn-around time.
Closes https://github.com/Microsoft/bond/pull/457
The Hackage package ansi-terminal as of version 0.6.3 is no longer
building with GHC 7.8.3, which causes out CI builds to fail.
Issue https://github.com/feuerbach/ansi-terminal/issues/22 has been
opened about this, but until it is resolved, we need to use an earlier
version.
The original condition (`NOT (MSVC_VERSION LESS 1900)`) was triggering
for Visual C++ 2015 as well.
* Visual C++ 2015 has a `MSVC_VERSION` of 1900.
* Visual C++ 2017 has a `MSVC_VERSION` of 1910.
The original error was not caught, as it was causing the _command line
warning_ "Command line warning D9002 : ignoring unknown option
'/permissive-'" to be emitted. The CI builds don't fail on these sort of
warnings. (The cl.exe switch `/WX` does not turn this warning into a
non-zero exit code.)
Accessing names that are dependent on the tempalted base class need to
be accessed via this->. Visual C++ 2015 doesn't enforce this everywhere,
but other compilers and Visual C++ 2017 need this.
We were only building the core C# compat test before. Now, we build the
Comm and gRPC variants as well.
We don't always need all of these C# compat tests--depending on what
part of C++ we're building--but they're pretty fast to build, so build
them all.
The previous approach only installed yasm for entries in the matrix that
explicitly opted-in, which resulted in duplicate state. Now, it figures
out whether yasm is needed by looking for the BOND_ENABLE_GRPC CMake
flag.
The thread pool needs to remain alive while its clients are alive as
well. This is now indicated by having the clients participate in shared
ownership of the thread pool.
* For the common case when an io_manager is just needed to drive some
I/O work (e.g., for a client proxy), there are new overloads that
create a grpc::CompletionQueue.