Skip to content

Releases: microsoft/bond

8.1.0

27 Mar 20:37
Compare
Choose a tag to compare

8.1.0: 2019-03-27

C++

  • C# / Nuget release only

C#

  • Updated to gRPC v1.17.1.
  • Add a constructor that accepts a CallInvoker instance to the generated
    gRPC clients to support client-side interceptors. For more details about
    C# interceptors, see the proposal in the gRPC
    project
    .
    Issue #950

8.0.1

29 Jun 18:18
c913deb
Compare
Choose a tag to compare

8.0.1: 2018-06-29

  • gbc & compiler library: 0.11.0.3
  • IDL core version: 3.0
  • C++ version: 8.0.1
  • C# NuGet version: 8.0

C++

  • Fixed a crash in bond::ext::grpc::server's destructor when invoked on
    a moved-from object instance.
  • Added move-assignment operator to bond::blob.
  • Added cmake variable BOND_FIND_RAPIDJSON to allow for external RapidJSON installations.

C#

  • There were no C# changes in this release.

8.0.0

30 May 21:58
Compare
Choose a tag to compare
  • gbc & compiler library: 0.11.0.0
  • IDL core version: 3.0
  • C++ version: 8.0
  • C# NuGet version: 8.0

gbc and Bond compiler library

  • Breaking change The deprecated Bond Comm functionality has been removed.
    This includes all gbc options related to Comm and the Comm codegen templates
    in the Haskell library. Issue
    #824
  • C++ codegen now properly generates move assignment operators. Previously,
    this was broken for some cases.
  • C++ codegen no longer generates checks for C++11, except for MSVC 2013
    workarounds.
  • C++ codegen no longer generates data member initialization that invokes a
    constructor accepting Comparer for associative containers.
  • C++ codegen can now generate copy and move constructors with an allocator
    argument when a custom allocator is used and --alloc-ctors is passed to
    gbc.
  • C++ codegen can now generate type
    aliases
    that
    correspond to ones in IDL when the --type-aliases flag is passed to gbc.
  • C++ codegen can now use
    std::scoped_allocator_adaptor
    for strings and containers when a custom allocator is used and the
    --scoped-alloc flag is passed to gbc.
  • C++ codegen now generates lazily constructed enum name-to-value and
    value-to-name maps. Additionally, a user-defined map type can now be
    provided to GetNameToValueMap and GetValueToNameMap.
  • C++ codegen now applies the --export-attribute to the ToString,
    FromString, ToEnum and FromEnum functions.
  • Fixed a bug in C++ codegen that incorrectly applied the export attribute to
    generic gRPC services.
  • C++ codegen now generates an allocator_type typedef for a struct when the
    --allocator option is passed to gbc, instead of specializing
    std::uses_allocator.
  • import statements can now end with an optional semicolon.
  • File and directory paths on the command line, in response files, or in
    import statements can now use a mix of forward and backslashes. Issue
    #869
  • gbc is now Authenticode dual-signed with both SHA1 and SHA2.

C++

  • Breaking change The deprecated Bond Comm functionality has been removed.
    This includes all gbc options related to Comm and all Comm APIs and header
    files. Issue #824
  • Breaking change Only versions of Boost released in the past two years
    (1.61 and newer) are supported. Bond will likely continue to work with
    older versions, but it is no longer tested with anything older than 1.61.
    Test coverage for Boost versions 1.61–1.66 has been improved. Issue
    #771
  • Breaking change Constructors accepting a Comparer have been removed
    from the bond::maybe and bond::nullable types.
  • Breaking change The bond::is_blob and bond::is_nullable traits have
    been removed. The blob and nullable types are not customizable, so these
    where never needed or used. The related functionality provided by
    bond::get_list_sub_type_id remains.
  • Breaking change Removed a dangerous implicit conversion operator from
    bond::maybe<T> to const T&. To access a bond::maybe<T> value, use one
    of the bond::maybe<T>::value functions.
  • Breaking change The nested pointer, const_pointer, reference and
    const_reference typedefs have been removed from bond::nullable<T>.
  • Breaking change The Allocator (second) type parameter has be removed
    from bond::nullable<T> and now it is always deduced from T.
  • Breaking change The bond::capped_allocator and related types have been
    moved to the bond::ext namespace and the "bond/ext" include directory.
  • Breaking changes in Bond-over-gRPC (based on real-world use and
    feedback). Check the updated
    examples
    to see how to use the changed APIs.
    • The generated ClientCore and ServiceCore class templates and the
      Client and Service convenience typedefs have all been replaced with
      normal classes named Client and Service. The ThreadPool type
      parameter has been removed in favor of a simplified runtime representation
      of a Scheduler.
    • The Scheduler concept and the bond::ext::gRPC::thread_pool
      implementation now use operator() instead of a schedule() member
      function.
    • The bond::ext::gRPC::server_core class template and the
      bond::ext::gRPC::server convenience typedef have been replaced with the
      normal class bond::ext::gRPC::server.
    • The generated Client::Async* functions now accept the
      std::shared_ptr<grpc::ClientContext> argument as the last parameter
      instead of as the first. This makes is easier to omit this parameter when
      no context customization is needed.
    • The client callback now directly accepts
      bond::ext::gRPC::unary_call_result<Response> (drops the
      std::shared_ptr). Also the unary_call_result now exposes read-only
      getters rather than fields. This simplified the type that clients need to
      deal with.
    • The bond::ext::gRPC::wait_callback::arg_type has been removed.
    • The client_callback.h header file has been renamed to
      unary_call_result.h to align with its contents.
    • The bond::ext::gRPC::server_builder has been replaced by the
      bond::ext::gRPC::server::Start factory function which now returns a
      plain bond::ext::gRPC::server object and accepts service instances
      managed by std::unique_ptr. This properly models the lifetime
      requirements. Service implementations must now pass a Scheduler to the
      generated Service base class which is no longer default constructible.
    • The generated method reflection information no longer uses a redundant
      bonded<T> wrapper for input_type and result_type typedefs.
    • The bond::ext::gRPC::unary_call no longer requires bonded<T> wrapper
      for request type.
    • The bond::ext::gRPC::unary_call::FinishWithError has been renamed to
      Finish. Overloads that take a status can be used to signal an error.
    • The grpc::Status second argument has been removed from
      bond::ext::gRPC::unary_call::Finish. gRPC does not support sending a
      response with a non-OK status, so the payload was being droped anyway.
    • Fixed bond::ext::gRPC::unary_call, bond::ext::gRPC::shared_unary_call
      and bond::ext::gRPC::unary_call_result types to properly use void and
      bond::reflection::nothing instead of the bond::Void empty struct. Also
      removed unnecessary functions from unary_call and shared_unary_call
      for those cases when they are not applicable (e.g. Finish is not
      available when return type is nothing).
  • gRPC v1.12.0 is now required to use Bond-over-gRPC.
    • This version include a number of memory leak fixes that users of
      Bond-over-gRPC were encountering. Issue
      #810
    • This version include some Windows-specific performance
      improvements for loopback connections.
  • The bond::ext::gRPC::wait_callback has been deprecated in favor of
    additionally generated client functions that return std::future.
  • Fixed includes for gRPC services with events or parameterless methods.
    Issue #735
  • Fixed a bug which would read an unrelated struct's field(s) when
    deserializing a base struct. Issue
    #742
  • Fixed a bug in bond::MapTo<T>::Field that failed to pass the Protocols
    type parameter to bond::Apply.
  • Fixed a race condition when bond::ext::gRPC::io_manager::shutdown and
    bond::ext::gRPC::io_manager::wait are called concurrently.
  • Fixed a race condition during bond::ext::gRPC::unary_call destruction.
  • Fixed the broken move constructor of bond::bonded<T, Reader&>.
  • Fixed the move constructor of bond::value to actually move the underlying reader.
  • Added the bond::blob_prolong helper function that will return a
    bond::blob with a copied data if the original one does not own the memory.
  • The bond::OutputBuffer::GetBuffers now can accept arbitrary STL-like
    containers.
  • bond::maybe<T> has been overhauled.
    • Fixed a bug that default initialized an instance of T even when a
      maybe held nothing.
    • Added noexcept variants of bond::maybe<T>::value.
    • Added bond::maybe<T>::emplace to construct a maybe's value in place.
    • Added various rvalue-reference and allocator-aware constructors and
      assignment operators.
    • Added operator==(const bond::maybe<T>&, const T&) and
      operator==(const T&, const bond::maybe<T>&) to compare directly to
      instances of T.
  • Fixed an issue with the ToString, FromString, ToEnum and FromEnum
    functions that were previously not exported from a DLL when the
    --export-attribute option was passed to gbc. Issue
    #861
  • Fixed a bug in bond::nullable<T, Alloc> where it was not propagating an
    allocator to T when allocator_type was not explicitly defined.
  • Fixed a bug in bond::make_box where const T& was not handled correctly.
  • The use of bond::check_method has been replaced with less restricting
    expression SFINAE checks on supported compilers. Issue
    #896
  • Fixed a bug where bond::ext::gRPC::io_manager could cause a thread to join
    itself.
  • The preferred namespace for Bond-over-gRPC is now bond::ext::grpc. The
    previous namespace, bond::ext::gRPC, continues to work.
    ...
Read more

Java 7.0.0-preview-2017-11-16

17 Apr 23:50
Compare
Choose a tag to compare
Pre-release

This is a preview release of Bond codegen for Java.

7.0.2

31 Oct 00:24
Compare
Choose a tag to compare

7.0.2: 2017-10-30

  • gbc & compiler library: 0.10.1.0
  • IDL core version: 2.0
  • IDL comm version: 1.2
  • C++ version: 7.0.2
  • C# NuGet version: 7.0.1
  • C# Comm NuGet version: 0.14.0

C++

  • Fixed a memory leak when deserializing Bond-over-gRPC messages that were
    stored as multiple slices.

C#

  • There were no C# changes in this release.

7.0.1

26 Oct 23:05
Compare
Choose a tag to compare

7.0.1: 2017-10-26

  • gbc & compiler library: 0.10.1.0
  • IDL core version: 2.0
  • IDL comm version: 1.2
  • C++ version: 7.0.0
  • C# NuGet version: 7.0.1
  • C# Comm NuGet version: 0.14.0

C#

  • Fixes a regression introduced in 7.0.0 that resulted in an exception during
    generation of Serializer instances if the type contained an aliased
    required blob field.

7.0.0

24 Oct 23:38
Compare
Choose a tag to compare

7.0.0: 2017-10-24

  • gbc & compiler library: 0.10.1.0
  • IDL core version: 2.0
  • IDL comm version: 1.2
  • C++ version: 7.0.0
  • C# NuGet version: 7.0.0
  • C# Comm NuGet version: 0.13.0

gbc and Bond compiler library

  • Add service/method annotations in C# for Comm and gRPC.
  • Add service/method metadata support in C++ for gRPC.
  • C++ codegen now uses std::allocator_traits
    for rebinding allocator types.

C++

  • Added bond::make_box helper function to create bond::Box<T> instances.
  • When Unicode conversion fails during JSON deserialization to wstring, a
    bond::CoreException is now thrown instead of a Boost exception.
  • When SimpleJSON deserializes a map key with no matching value, a
    bond::CoreException is now thrown.
  • When SimpleJSON deserializes a map key of non-primitive type, a
    bond::CoreException is now thrown.
  • Errors from some versions of G++ like "non-template type Deserialize
    used as a template" have been fixed.
    Issue #538
  • Guard against overflows in OutputMemoryStream, blob, and SimpleArray.
  • Use RapidJSON's iterative parser to handle deeply nested JSON data without
    causing a stack overflow.
  • Guard against min/max being function-style macros in more places.
  • Allow Bond-generated C++ types to use non-default-constructable
    allocators. (This works even on MSVC 2013 by only compiling the
    generated-type's default constructor if it is used. The default
    constructor is now a templated constructor that is invokable with zero
    arguments.)
  • Fixed some macro uses that did not have sufficient parenthesis around
    parameters and resulted in compiler errors.
  • Added the bond::ext::gRPC::shared_unary_call type. This type can be used
    when shared ownership semantics are needed for unary_call instances.
  • Provide compile-time access to metadata about gRPC services and methods.
  • Using bond::ext::gRPC::wait_callback no longer causes a shared_ptr cycle
    and the resulting resource leak.
  • Ensure that bond_grpc.h and bond_const_grpc.h are generated when the
    CMake variable BOND_ENABLE_GRPC is set to that importing bond.bond and
    bond_const.bond when defining a service works.
  • Added bond::capped_allocator adapter that will allow to limit the max
    number of bytes to allocate during deserialization.

C#

  • Breaking change The code generation MSBuild targets no longer support
    Mono's xbuild: only MSBuild is supported. Mono has
    deprecated xbuild in favor of MSBuild
    now that
    MSBuild is open source and cross-platform.
  • Breaking change The code generation MSBuild targets now automatically
    compile the generated _grpc.cs files if --grpc is passed to gbc.
    Explicit <Compile Include="$(IntermediateOutputPath)foo_grpc.cs" />
    lines in MSBuild projects will need to be removed to fix error MSB3105
    about duplicate items. See commit
    a120cd99
    for an example of how to fix this.
    Issue #448
  • Breaking change The low-level API IParser.ContainerHandler now has an
    arraySegment parameter for the converted blob.
  • The code generation MSBuild targets will now skip compiling the
    _types.cs files when --structs=false is passed to gbc.
  • Added Bond.Box.Create helper method to create Bond.Box<T> instances.
  • Reflection.IsBonded now recognizes custom IBonded implementations.
  • Use Newtonsoft's JSON.NET BigInteger support -- when available -- to
    handle the full range of uint64 values in the SimpleJson protocol (.NET
    4.5 or greater, .NET Standard 1.6 or greater).
  • Bond.IO.Unsafe.InputStream can now be used with streams that do not
    implement Stream.Seek, like
    System.IO.Compression.GzipStream.
    Issue #498
  • Fix a bug in CompactBinaryWriter when using v2 that repeated first pass
    when a bonded field was serailized, resulting in extra work and extra
    state left in the CompactBinaryWriter.
  • Apply IDL annotations to services and methods for gRPC.
    Issue #617
  • Fixed a bug that produced C# code that couldn't be compiled when using
    Bond-over-gRPC with a generic type instantiated with a collection.
    Issue #623
  • When targeting .NET 4.5, avoid resolving external entities when using
    SimpleXmlReader.
  • Remove redundant conversions during serialization of aliased blobs.

C# Comm

  • Apply IDL annotations to services and methods for Comm.

6.0.0

30 Jun 04:27
Compare
Choose a tag to compare
  • gbc & compiler library: 0.10.0.0
  • IDL core version: 2.0
  • IDL comm version: 1.2
  • C++ version: TBD 6.0.0
  • C# NuGet version: 6.0.0
  • C# Comm NuGet version: 0.12.0

gbc and Bond compiler library

  • IDL support for service inheritance syntax
    • Breaking change In the Bond Haskell library, the Service type
      has a new field serviceBase.
  • C++ codegen now generates
    extern templates
    of bond::Apply instead of overloads.
  • C++ codegen hides FieldTemplate details, shortening symbol names.

C++

  • Breaking change A C++11 compiler is now required. The minimum
    supported C++ compiler versions are now:
    • Clang 3.4 or newer
    • GNU C++ 4.7 or newer
    • Microsoft Visual C++ 2013 or newer
  • Breaking change The generated apply.h/.cpp files now contain
    extern templates
    of bond::Apply instead of overload implementations. Calls to bare Apply
    or TypeNamespace::Apply must be changed to bond::Apply.
  • Breaking change Users who are implementing custom streams are now
    required to provide the free functions CreateInputBuffer,
    CreateOutputBuffer and GetBufferRange, depending on which scenarios
    are used (there will be a corresponding compilation error for each case).
    • Users who were mistakenly calling bond::Merge<T> with explicit an
      template argument will get a compilation error. To fix, remove the
      <T> part.
    • In addition, users of MSVC12 are required to define a range_type
      typedef as a return type of corresponding GetBufferRange inside
      their custom input buffer implementation.
    • Please see
      InputBuffer,
      OutputBuffer,
      and
      the bf example
      for more details.
  • Breaking change The 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. For more details please see the bf example.
  • Initial support for sending
    Bond objects over gRPC
    has been added.
  • The bond::Apply function now has a uniform signature. Call sites for the
    Marshaler<Writer> transform overload that were mistakenly passing
    Writer explicitly (e.g. bond::Apply<Writer>(marshaler, value)) will
    now get a compiler error. To fix, remove the <Writer> part:
    bond::Apply(marshaler, value).
  • Fixed a bug that caused serialization using
    CompactBinaryWriter<OutputCounter> (to get the expected length of
    serializing with compact binary) to produced bogus results.
  • Fixed
    custom streams
    support which was broken for some scenarios.
  • For Visual C++ 2017 compability, RapidJSON v1.0.0 or newer is now
    required. The RapidJSON submodule that Bond uses by default has been
    updated to v1.1.0 due to a warning from clang in earlier versions.
  • C++ codegen hides FieldTemplate details, shortening symbol names.

C#

  • Breaking change Support for .NET 4.0 has been dropped from the
    supported frameworks.
  • Breaking change The deprecated type Bond.BondReflection has been
    removed. The type Bond.Reflection should be used instead.
  • Breaking change Bond assemblies are now
    strong-name signed
    with the
    bond.snk
    key in the repository instead of with a Microsoft key. This allows anyone
    to produce compatible assemblies, not just Microsoft. Official
    distribution of Bond will continue to be
    Authenticode signed
    with a Microsoft certificate.
    Issue #414
    • The new public key for assemblies is now
      00240000048000009400000006020000002400005253413100040000010001000d504ac18b4b149d2f7b0059b482f9b6d44d39059e6a96ff0a2a52678b5cfd8567cc67254132cd2debb5b95f6a1206a15c6f8ddac137c6c3ef4995f28c359acaa683a90995c8f08df7ce0aaa8836d331a344a514c443f112f80bf2ebed40ccb32d7df63c09b0d7bef80aecdc23ec200a458d4f8bafbcdeb9bf5ba111fbbd4787
  • Breaking change Bond assemblies now have assembly and file versions
    that correspond to their NuGet package version. Strong name identities
    will now change release-over-release in line with the NuGet package
    versions. Issue #325
  • The codegen MSBuild targets will now re-run codegen if gbc itself has been
    changed.
  • Fixed a bug where JSON and XML protocols would permit the serialization of
    non-nullable string fields that were set to null instead of throwing a
    NullReferenceException.
    Issue #417

5.3.1

25 Apr 23:38
Compare
Choose a tag to compare

5.3.1: 2017-04-25

  • gbc & compiler library: 0.9.0.0
  • IDL core version: 2.0
  • IDL comm version: 1.2
  • C++ version: 5.3.0
  • C# NuGet version: 5.3.1
  • C# Comm NuGet version: 0.11.1

C#

  • Cleaned up documentation comments.

5.3.0

13 Apr 22:28
Compare
Choose a tag to compare

5.3.0: 2017-04-12

  • gbc & compiler library: 0.9.0.0
  • IDL core version: 2.0
  • IDL comm version: 1.2
  • C++ version: 5.3.0
  • C# NuGet version: 5.3.0
  • C# Comm NuGet version: 0.11.0

gbc and Bond compiler library

  • C++ codegen ensures that parameter names do not shadow field names.
  • When generating C++ apply files, there are now explicit bond::Apply<>
    instantiations for CompactBinaryWriter<OutputCounter> and
    SimpleBinaryWriter<Null> writers.
    Pull request #373
    • Breaking change (Haskell library only):
      Language.Bond.Codegen.Cpp.ApplyOverloads.Protocol is now a union of
      ProtocolReader and ProtocolWriter to permit mixing and matching of
      reader/writer protocols without having to explicitly compute the full
      cross product.
  • Add gbc flags to pick which C# files to generate (structs, gRPC, and
    comm). Only structs are generated by default.
  • gbc ensures that method names are unique within a service.
    Issue #381

C++

  • Fix Python shared_ptr converter build break with Boost 1.63.
  • Improve compliance with
    Microsoft's SDL.
  • Eliminate need for warning suppression on MSVC14 via warning.h in Bond
    itself. warning.h is still in place on MSVC12; furthermore, we don't alter
    warning.h for now as it may be depended upon by application code.
  • Avoid unaligned memory access on non-x86/x64 platforms.
    Issue #305
  • Improve compliance with strict-aliasing rules.
    • Bond now builds on Clang/GCC with -fstrict-aliasing.
  • When generating C++ apply files, there are now explicit bond::Apply<>
    instantiations for CompactBinaryWriter<OutputCounter> and
    SimpleBinaryWriter<Null> writers.
    Pull request #373
  • Improve C++ allocator support
    Issue #379
    Pull request #380
    • Support C++11 and above allocator model for rebind
    • Simplify detection of the default allocator
  • Remove per-field instantiation of DynamicParser<>::UnknownFieldOrTypeMismatch method.

C#

  • Added gRPC integration. See the
    Bond-over-gRPC manual.
  • Added controls to cap incremental allocation between reads in
    Bond.IO.Unsafe.InputStream.
  • Extended fix for bug parsing JSON when a string value is a date.
    Pull request #358
  • Bond C# 5.1.0 accidentally broke backward compability by renaming
    Bond.Reflection to Bond.BondReflection. This has been fixed:
    Bond.BondReflection was unrenamed back to Bond.Reflection, and a shim
    Bond.BondReflection type now redirects all calls to their original names
    to minimize further breakage.
    Issue #369
    • Code that started using Bond.BondReflection by name will encounter
      warning CS0618 indicating use of an obselete method/type. To fix this,
      use the original name Bond.Reflection. This warning can be
      suppressed if needed. However...
    • ...the shim type Bond.BondReflection will be removed during or after
      the next major release of C# Bond.

C# Comm

  • Breaking change To generate C# Comm files, be sure to pass the
    --comm flag to gbc.
    See how the pingpong example was updated.
  • C# Comm is now deprecated. We recommend that you use Bond-over-gRPC. See
    the
    Bond-over-gRPC manual.
  • EpoxyListener's StopAsync() now stops all the outstanding connections that
    it accepted.
  • EpoxyTransport's StopAsync() now stops all the connections and listeners
    that it created.