Граф коммитов

828 Коммитов

Автор SHA1 Сообщение Дата
Chad Walters 7b4b5f8821 [c#] Cap incremental memory usage in InputStream 2017-03-10 13:20:48 -08:00
Christopher Warrington 19b4e32203 [c++ epoxy] Update 5.2.0 changelog with missed fix 2017-03-09 16:53:50 -08:00
Christopher Warrington bd82359a46 [gbc] Temporarily pin derive dependency to < 2.6
gbc-tests no longer builds with derive 2.6 or later. While we
investigate that problem, pin the dependency to < 2.6 to keep gbc-tests
building.

Mitigates https://github.com/Microsoft/bond/issues/342
2017-03-09 16:52:33 -08:00
Christopher Warrington 3708a3b8b0 Use precompiled pandoc for building documentation (#353)
* Use precompiled pandoc for building documentation

Instead of building pandoc from source, we now just use Chocolately to
install a precompiled version of pandoc. This speeds up documentation
builds and prevents random breakage due to Hackage package changes.

NB: The Chocolately Pandoc 1.19.2.1 package is currently broken. It
appears to have a pre-release Pandoc 2.0 executable that doesn't
understand all the command line flags that 1.x does (e.g., --smart).

Fixes https://github.com/Microsoft/bond/issues/341

* Match Window's default path building order
2017-03-09 16:32:22 -08:00
Christopher Warrington 1426db8e9a Add CMake option to install generated .cpp files
The CMake cache variable BOND_LIBRARIES_INSTALL_CPP controls whether the
generated .cpp files are installed under src/. This can be used to keep the
code around for debugging purposes or to create a self-contained copy of
Bond that can be built with something other than CMake.
2017-03-01 03:32:53 -08:00
Chad Walters 2f4d56e6e6 [C++ Comm] Fix cmake problems in examples
Fix a regression from https://github.com/Microsoft/bond/pull/323
2017-02-28 17:52:12 -08:00
Christopher Warrington 59be2e2150 Highlight breaking changes in CHANGELOG 2017-02-27 13:48:49 -08:00
Christopher Warrington 0c88b25f53 [c# epoxy] Fix TLS example for IPv6 localhost
Before, we were only listening on IPv4 loopback. If "localhost" resolves
to [::1], we couldn't connect. Now, we listen on both of the default
IPv4 and IPv6 loopback addresses.
2017-02-24 12:13:49 -08:00
Christopher Warrington 708c9ded04 [c# epoxy] Safely shutdown possibly null sockets
If the function that produces the socket itself throws, we may not have a
socket to call Shutdown and Close on. This fixes a regression introducted by
2f9aeae.
2017-02-22 09:35:19 -08:00
Christopher Warrington 2f9aeaef3e [c# epoxy] Improve Epoxy shutdown
Shutdown of various Epoxy objects now cleans up outstanding connections
and listeners that were created.

Closes https://github.com/Microsoft/bond/pull/320
2017-02-17 13:30:54 -08:00
Christopher Warrington 9b070671dd [c# epoxy] Clean up unstarted EpoxyConnections
If an EpoxyListener or EpoxyTransport is shutdown between creation of a
EpoxyConnection, but before the connection was started, calling
StopAsync() on the connection would never complete, as the connection
loop needed to run to transition the connection to Disconnected.

Now, EpoxyConnection.StopAsync() can be called before the connection has
been started to clean up the network resources.
2017-02-17 13:20:07 -08:00
Christopher Warrington 059a593f5f [c# epoxy] Add CleanupCollection for shutdown
* Add the CleanupCollection<T> class to collect things that later need
  to be cleaned up.
* Use CleanupCollection in EpoxyListener and EpoxyTransport to simplify
  and centralize shutdown cleanup.
2017-02-17 13:20:07 -08:00
Christopher Warrington 8194196f60 [c# epoxy] Have transport StopAsync stop everything
EpoxyTransport.StopAsync() now stops all the client connections and
listeners that it created.
2017-02-17 13:20:06 -08:00
Christopher Warrington 44a4d53ffc [c# epoxy] Make listener shutdown connections too
When an EpoxyListener is shutting down, it now stops all the outstanding
connections that it accepted.
2017-02-17 13:19:35 -08:00
Ted Stein 34e74f01d2 Generate unique ports for each test and example. 2017-02-14 13:41:30 -08:00
Chad Walters 2b2db91450 Add documentation of schema evolution rules 2017-02-13 13:06:33 -08:00
Chad Walters 73f4ed6bb7 Add protocols section to C# manual 2017-02-13 13:06:33 -08:00
Chad Walters 482c35596a Fix typo in C++ manual 2017-02-13 13:06:33 -08:00
Ted Stein d442c48647 Shatter the C++ Comm unit test monolith. 2017-02-10 14:51:02 -08:00
Ted Stein 3e1de4a377 [C++ Comm] Clean up unit_test_comm_ naming. 2017-02-10 14:51:02 -08:00
Christopher Warrington f5a1a95235 Rename pre-compiled gbc when installing
The pre-compiled gbc may not be called "gbc" if the user specified the
CMake variable BOND_GBC_PATH, so we need to rename it to gbc when
installing.

Closes https://github.com/Microsoft/bond/pull/324
2017-02-09 10:16:17 -08:00
Christopher Warrington 64c5897286 [c# epoxy] Improve multiple shutdown test
Before, the `Connection_CanBeStoppedMultipleTimes` test was just
asserting that the connection had been shutdown once--not
twice--before asserting.

Now, we assert that both shutdowns have happened.

Closes https://github.com/Microsoft/bond/pull/321
2017-02-08 19:42:10 -08:00
Christopher Warrington 2f63ea301e Require explicit opt-in to use pre-compiled gbc
Before this change, the build would look for pre-compiled gbc in a lot
of places on the system. It would often find gbc from a prior install of
Bond. However, this frequently causes the build to fail. Now, it only
looks for pre-compiled gbc in the directory specified by the environment
variable BOND_GBC_PATH. Alternatively, if the CMake variable
BOND_GBC_PATH is set, that will be used directly.
2017-02-08 14:17:36 -08:00
Christopher Warrington 38c22a4492 Fix typo in changelog 2017-02-07 18:01:27 -08:00
Christopher Warrington 4c6e18810b Update Nuget test to version 5.2.0 2017-02-07 17:44:21 -08:00
Christopher Warrington 31d88afa18 Prepare for the 5.2.0 release
Due to the C++ Boost dependency bump, both BOND_VERSION and
BOND_MIN_CODEGEN_VERSION in bond_version.h have been updated to the
current version.
2017-02-07 16:04:41 -08:00
Ted Stein f499596432 [C++ comm] Rephrase unit tests to match core.
Closes https://github.com/Microsoft/bond/pull/319
2017-02-06 15:09:10 -08:00
Chad Walters c45473291b [C++ Comm] Address object lifetime issue in layers 2017-02-01 12:48:53 -08:00
Chad Walters 4f2e0557f3 [gbc] Update schema codegen for DLL support
Fixes https://github.com/Microsoft/bond/issues/314
2017-02-01 12:48:53 -08:00
Chad Walters 776dc5bf4b [C++ Comm] Add Windows DLL example for Comm 2017-02-01 12:48:53 -08:00
Chad Walters f575882d75 [C++] Add Windows DLL example for Core 2017-02-01 12:48:53 -08:00
Chad Walters 600c31dee2 [C++ Comm] Add static library example for Comm 2017-02-01 12:48:53 -08:00
Christopher Warrington 42fde481e3 [c# epoxy] Make generated interfaces public
The interfaces were inadvertently internal before.
2017-01-26 18:10:56 -08:00
Christopher Warrington 63acbec45a Copy edit C# streams documentation
Closes https://github.com/Microsoft/bond/pull/311
2017-01-21 21:49:03 -08:00
Christopher Warrington cd4e08e347 [gbc] Rename Types_Comm_cpp to Comm_cpp
Renamed the file, the module, and the functions.
2017-01-20 11:14:54 -08:00
Christopher Warrington b9ec588254 Remove non-ASCII characters from source files 2017-01-19 16:28:32 -08:00
codeandroid a3ff101897 [c++] Fix is_nullable for MSVC 2015u3
Fixes https://github.com/Microsoft/bond/issues/306
Closes https://github.com/Microsoft/bond/issues/307
2017-01-19 14:29:39 -08:00
Christopher Warrington 6c11df8eb7 [c#] Fix default value for aliased bool/wstr field
The default value of aliased bool and wstring fields was being computed
incorrectly. We were attempting to cast the aliased C# type (e.g., DateTime)
to the field type instead of using the field's natural default value
(false/empty).

Fixes https://github.com/Microsoft/bond/issues/300
Closes https://github.com/Microsoft/bond/pull/301
2017-01-18 13:44:16 -08:00
Christopher Warrington b462c03f67 [c++] Remove unused UNIT_TEST_SUBSET
This macro is less useful now that the tests have been exploded into
smaller executables.
2017-01-18 11:45:45 -08:00
Jeff Dubrule 7e7cdf6919 [c++] Support `using Alias<T>=T` when T is an enum
Closes https://github.com/Microsoft/bond/pull/298
2017-01-13 16:30:10 -08:00
Christopher Warrington 3c3fe5d932 [c# epoxy] Handle client-side connection failures
* Client-side connection failures now close the sockets and streams that
  are created during the connection process if an error occurs while
  setting up the TCP or TLS connection.
* Refactored similar code that is used in the listener so that we have
  one copy of the core algorithm.
* Removed some redundant try...catch blocks that were just logging
  exceptions and installed top-level connect/accept exception handles
  that then log.

Closes https://github.com/Microsoft/bond/pull/295
2017-01-13 15:57:39 -08:00
Chad Walters a3fdbb9c24 [C++ Comm] Suppress boost::asio warning on MacOS 2017-01-13 10:51:14 -08:00
Chad Walters bfd484f80a [C++ Comm] Break apart monolithic Comm unit tests
Break the unit tests into multiple files.
2017-01-13 10:51:14 -08:00
Chad Walters 2c0707f3b9 [C++ Comm] Address issue with multiple defines (#296)
Closes https://github.com/Microsoft/bond/issues/294
2017-01-12 10:42:43 -08:00
Chad Walters 18c142ab91 [C#] Add preallocation controls in deserialization (#297)
Provide controls that cap the amount of pre-allocation done for
containers and blobs.
2017-01-12 10:41:57 -08:00
Christopher Warrington bc4f7d881a [c++] Fix GCC warnings in release build
The major classes of warnings were
* potentially uninitialized variables,
* violations of strict aliasing rules, and
* unused variables.

Potentially uninitialized variables were set to sensible defaults.

The strict aliasing violations stemmed from type punning. They were
fixed by eliminating the type punning or switching to using
`std::memcpy` to perform type punning.

Unused variable warnings stemmed from our tests and examples using
`assert()` for the check. Since `assert()` is eliminated in a release
build, these warnings were fixed by using `boost::ignore_unused`.
However, the use of `assert()` for testing makes the "check" build
target much less useful for a release build. Issue
https://github.com/Microsoft/bond/issues/291 is open to improve this.
Until then, `boost::ignore_unused`.

When initializing SchemaDef, there was a place where we were casting a
dummy `char` to a `T&`. Since the `T&` is never referenced when creating
the SchemaDef, we now create a `const T&` from `nullptr`.

Closes https://github.com/Microsoft/bond/pull/292
2017-01-09 15:33:10 -08:00
Jeff Dubrule 73d7cdfe12 [c++] Suppress unused variable warnings in Comm
Closes https://github.com/Microsoft/bond/issues/284
Closes https://github.com/Microsoft/bond/pull/290
2017-01-09 15:32:52 -08:00
Adam Sapek 0d7b261275 Extend bf utility to support multiple payloads
The `bf` C++ example is a handy utility to work with files containing
arbitrary Bond payloads. This change extends it to support files with
more than one Bond payload.

The most obvious use case is files with a sequence of records (e.g.
logs). The less obvious but very powerful scenario is extracting some
kind of header that precedes the actual Bond payload of interest. This
is possible because a Bond schema in Simple Binary protocol can be used
to model many kinds of arbitrary headers (e.g. any fixed size header
aligned to octet boundary).

The change is backward compatible and existing command line arguments
retain their old semantics. In order to process multiple payloads user
can specified multiple `--schema` and/or multiple `--from` arguments,
e.g.:

    bf --from=simple --schema=header.json,payload.json file

In the above example `bf` will first use Simple Binary to decode header
in schema specified in `header.json` and then will try to guess the
protocol of the next payload (since only one `--from` argument was
specified) and decode it using schema specified by the `payload.json`
file.

Multiple values for the `--schema` and `--from` arguments can be
specified either as comma delimited values (like in the example above)
or by passing the argument multiple times, e.g.:

    bf --from=fast --from=fast file

Closes https://github.com/Microsoft/bond/pull/288
2017-01-09 08:45:13 -08:00
Adam Sapek 77e9754f27 Include rapidjson header files in install directory
Without rapidjson headers Bond installation can't be used to build
C++ programs.
2017-01-06 18:39:07 -08:00
Adam Sapek 2475cbba37 Fix install directory for .bond files
CMake install DIRECTORY installs specified directory, not the files from
that directory, in the DESTINATION.
2017-01-06 18:34:35 -08:00