New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FI Microsoft/bond/master => lokitoth/bond/master #1
Commits on Jan 10, 2015
Commits on Jan 13, 2015
-
-
Fix compiler build for non-ascii cabal path
CMake Visual Studio generator translates add_custom_command into a batch file embedded in Visual Studio project. Batch files have problems with paths that contain non-ascii characters because they are limited to DOS encoding. It so happens that cabal is quite likely to be installed in such a path because by default cabal installs into a directory under %APPDATA% which contains user name. As a workaround we execute cmake scripts as a custom commands and depend on CMake cache to get access to variables set during configuration. This way embedded batch files are free of non-ascii characters.
-
Merge pull request #9 from dnmiller/cmake-fix
Fix compiler CMake permissions for OSX
-
-
Kanak Kshetri committed
Jan 13, 2015 -
OutputBuffer implements IOutputStream not IOutputBuffer.
Kanak Kshetri committedJan 13, 2015 -
Commits on Jan 14, 2015
-
Fix C# build problem when cmake.bat is in PATH
Custom actions in Visual Studio projects are executed as batch files. If cmake is also a batch file then the statement: cmake ... will call cmake.bat and never return from it. Replacing it with: call cmake ... makes sure that the custom command batch file continues after cmake returns.
-
-
This project was more of a playground than a proper example. It was never included in cs.sln.
-
-
For now only configuring OS X build. Travis-CI runs Linux builds on Ubuntu 12.04 for which pre-built Boost packages end at 1.48. Bond currently requires 1.54.
Commits on Jan 15, 2015
-
-
-
Merge pull request #12 from dnmiller/cmake-fix
Update OS X instruction for homebrew Python
-
Simplify OS X build instructions
Use Homebrew to install cmake, ghc and cabal-install instead of CMake and Haskell Platform manual installations.
-
Rename Bond.cs to Bond.CSharp and Bond.Runtime.cs to Bond.Runtime.CSharp. The old packages on nuget.org are converted to redirect packages that are empty and only have dependency on the new packages.
-
Commits on Jan 17, 2015
-
-
Update configuration for Visual Studio 2015 CTP 5
The compiler now supports C++11 defaulted functions. Since Boost config doesn't detect features for the new compiler yet, we ignore BOOST_NO_CXX11_DEFAULTED_FUNCTIONS macro when _MSC_VER > 1900.
Commits on Jan 19, 2015
-
Fix JSON multi-line string test
Use multi-line string both in the JSON input and the verification assert.
-
-
-
By default the blob type maps in C# to ArraySegment<byte>. This choice is dictated by performance: using ArraySegment rather than a simple array allows deserializer to avoid memcpy. At the same time arrays are often a very convenient type in C# and Bond supports T[] as an alternative mapping for the schema type vector<T>. Although C# codegen doesn't generate arrays by default, users can either manually annotate array fields in their own classes with Bond attributes or they can use custom type alias mapping support (the gbc command line option --using) to generate classes with array fields. This change optimizes how C# byte[] is handled by object parser as well as serializer and deserializer transforms. Instead of reading/writing each byte individually, which is very expensive, when possible Bond will use fast block operations exposed by IUntaggedProtocolReader.ReadBytes, ITaggedProtocolReader.ReadBytes, IProtocolWriter.WriteBytes and IParser.Blob. It is important to note that even though byte[] gets the performance optimizations associated with blob, it is not the same as schema blob type. On the wire blob is represented as vector<int8> and C# byte[] maps to vector<uint8>. It is of course possible to map byte[] to schema blob type via an explicit type annotation: [global::Bond.Id(0), global::Bond.Type(typeof(global::Bond.Tag.blob))] public byte[] Arr { get; set; } The same can be achieved using type aliases: using ArrayBlob = blob; struct Foo { 0: ArrayBlob data = nothing; } gbc --using="ArrayBlob=byte[]" foo.bond Representing blob using a byte[] instead of the default ArraySegment<byte> is still a performance compromise because it requires memcpy during deserialization. In some cases the convenience of byte[] may justify it but for optimal performance ArraySegment<byte> is recommended. To make this trade-off clear, aliasing blob as byte[] requires that user provides explicit type converter, like for any other type alias.
-
Looks like AppVeyor doesn't support YAML line continuations.
-
Fix parsing of enum default values starting with L
The bug in the parser caused it to interpret any default value starting with the letter L as a string literal, resulting in a parsing error for constructs like: struct Foo { 0: Verbosity verbosity = Low; }
Commits on Jan 20, 2015
-
-
-
Fix symbol lookup logic in the parser
This change fixes a bug in lookup of an unqualified symbol from an imported schema file when one of the files is using a language specific namespace. Language specific namespaces are not documented and their use is not recommended, but the compiler supports them for backward compatibility with legacy code.
Commits on Jan 21, 2015
Commits on Jan 22, 2015
-
-
Make Bond compilable with mono xbuild
This is the first step to make the bond solution compilable with xbuild This commit allows to build Bond libraries and some bond examples. There are some limitations due to the reason xbuild does not support all MSBuild features. What is not supported: - NET 4.0 profile. xbuild builds only .NET 4.5 profile, there are compile errors when it tries to build .NET 4.0 target after building .NET 4.5. The issue that xbuild does not pass codegenerated files to mcs when build for .NET 4.0. Need more investigation why this happens. - Building tests. They are using VisualStudio test libraries which is not supported by mono. It will work when tests will be converted to NUnit tests - There are some compile errors in examples related to using LinkedList<double>. Need more investigation is this class supported by mono and if yes why there are errors.
-
Merge pull request #19 from xplicit/mono_csproj_2
Make Bond compilable with mono xbuild
Commits on Jan 23, 2015
-
Make test and examples projects are compilable with xbuild
This is the second step of making solution compilable with xbuild. It resolves all xbuild compilation issues except using references to VisualStudio asseblies in test projects. Fixed: - wrong path dilimiter usage in bond files on linux system - different case-sensitivity in file names - passing global $(BondOptions) property to codegen process
-
Merge pull request #20 from xplicit/fix_path
Make test and examples projects are compilable with xbuild
-
-
Commits on Jan 25, 2015
Commits on Jan 26, 2015
Commits on Jan 29, 2015
-
Add rudimentary Sublime Text 3 syntax highlighting
Users can install the grammar by adding the files to their `%AppData%\Roaming\Sublime Text 3\Packages\User` folder. It's fairly simplistic, but should be a decent start.
-
Commits on Jan 31, 2015
-
-
Merge pull request #25 from dnmiller/underflow-fix
Remove possible underflow in string buffer encoder
Commits on Feb 1, 2015
Commits on Feb 3, 2015
-
Merge pull request #26 from dnmiller/unused-semis
Remove unnecessary semicolons
-
Fix clone of MemoryStream on Mono
Mono MemoryStream internal implementation differs from .NET implementation It does not have `InternalGetOriginAndLength` method. So the cloning method changed to use mono implementation of MemoryStream when the method `InternalGetOriginAndLength` is not found
Commits on Feb 4, 2015
-
Move cabal install from ps script to cmd
PowerShell script fails AppVeyor CI build when cabal install emits warnings.
-
-
Relax cabal version requirement to 1.18+
The cabal version 1.20+ was required only for the --required-sandbox flag. However since the make files are setting up the sandbox we know that we are always building using sandbox. The current Haskell Platform comes with cabal 1.18 so this way installing cabal update is not needed.
-
-
-
Merge pull request #27 from xplicit/mono_fix2
Fix clone of MemoryStream on Mono
Commits on Feb 6, 2015
-
Update appveyor.yml for the open source plan
Made the following changes for the open source AppVeyor plan which runs on very slow and memory limited VMs: - Limit ghc heap size to 192MB when installing dependencies - Use `appveyor DownloadFile` instead `Start-Download` - Download Boost in the smaller 7Zip format - Cache cabal sandbox and boost download - Disable C++ build
-
Disable extracting Boost in AppVeyor CI
Since C++ build is disabled we don't need to extract Boost and the build is on the edge of time out.
-
Quote include directories in C# targets
This allows include directories to contain spaces.
-
-
Add unit test for files with spaces in their paths
This ensures that the MSBuild targets and gbc work when a .bond file or an import directory has spaces in the path.
-
-
Merge pull request #29 from chwarr/msbuild_quotes
Add support for paths with quotes in C# MSBuild targets
-
Commits on Feb 7, 2015
-
Fix import directories with trailing slashes
When support for import directories with spaces in their paths was added, that inadvertently broke codegen when one ended with a trailing slash. We add a trailing \. like we do for the output directory to fix that.
-
Merge pull request #31 from chwarr/msbuild_import_dir_trailing_slash
Fix import directories with trailing slashes
-
Merge pull request #30 from chwarr/import_example
Add example showing how import can be used
-
-
-
-
Commits on Feb 10, 2015
-
Use a smaller buffer when marshaling bonded<T>
When bonded<T> is serialized to untagged protocols like Simple Binary it is first marshaled into a separate buffer using a tagged protocol and then written as length prefixed blob to the untagged protocol. OutputBuffer used for marshaling by default allocates 64KB which is costly if the bonded<T> payload is small.
-
Commits on Feb 11, 2015
-
-
Combine unit tests into fewer assemblies
Unit tests take a long time to run in CI. Building all tests with --collection-interfaces flag is somewhat wasteful because a lot of tests don't use collections at all. Furthermore this way we only tested collection interfaces together with properties. This change removes the separate test configuration for --collection-interfaces and instead uses concrete/interface collection alternatively for different .bond files in Fields/Properties configuration. This way every schema is tested with both interfaces and concrete collections and both are also tested with fields and properties. This gives better coverage while eliminating redundant identical tests in different assemblies.
-
Commits on Feb 12, 2015
-
-
Merge pull request #35 from xplicit/nunit-merge6
Convert unit tests from MSTest to NUnit
-
-
Merge pull request #36 from xplicit/travis2
Add building cs.sln and running unit tests in Travis.CI
-
When compiling multiple .bond files at once, the `--jobs=[NUM]` command line option can be used to specify how many jobs should be run concurrently. When used without arguments, the default is to run as many jobs as there are processors. The option also accepts negative numbers to specify fewer jobs than the number of processors. Often the optimal performance is achieved by leaving one or more cores for other processes on the machine.
-
Avoid parsing the same import multiple times
In some scenarios the hierarchy of schemas may be very interconnected and redundant parsing of the same imported files is a huge performance overhead for code generation (this change showed 20x improvement when compiling a sample set of ~900 interconnected schemas).
-
Run multiple gbc jobs when using Bond.CSharp.targets
By default the Bond.CSharp.targets will run 2 fewer concurrent jobs than there are processor cores on the machine. User can override this behaviour for their project by specifying a different `--jobs` option in `BondOptions` property.
-
-
-
Commits on Feb 13, 2015
Commits on Feb 26, 2015
-
Fix bug in JSON parsing when string value is a date
When reading string fields, the SimpleJsonParser expects to find a JsonToken of type String. But if the string value matches a date format, the actual JsonToken that is seen is of type Date. To fix this, we are setting the JsonTextReader to not try to parse strings as dates. Also improve the exception text when reading unenxpected input to help know what JsonToken was actually read, and fix a similar possible issue with parsing doubles.
Commits on Feb 27, 2015
-
-
-
Switch AppVeyor to previous builder image
The new builder appears to have less memory and fails while building Haskell libraries.
-
Merge pull request #40 from ranrav/master
Fix bug in JSON parsing when string value is a date
Commits on Feb 28, 2015
-
-
Merge pull request #42 from ranrav/UpdateJsonExpression
Update JSON parser test expression
Commits on Mar 3, 2015
-
Merge pull request #32 from dnmiller/noexcept
Replace dynamic exception specifications with portable boost config specifier
Commits on Mar 5, 2015
Commits on Mar 10, 2015
Commits on Mar 19, 2015
Commits on Mar 20, 2015
-
-
Add compiler support for schema AST output
The schema AST is written in JSON format. We foresee two classes of scenarios that will use it. Tools that need to process Bond schema files using languages other than Haskell can avoid recreating Bond parser. Example might be schema repositories, lints, etc. The schema AST will also be used to allow users to inject schema transformations into codegen process. This in many cases can be a lightweight alternative to custom codegen.
-
-
Add round-trip unit test for AST JSON representation
Derived show typeclass for schema types in order to support QuickCheck. Added custom ShowPretty typeclass for printing Declarations in parser error messages. Implemented custom JSON parsing for types that had custom JSON serialization.
-
Use standalone deriving Generic declarations
The Generic instance is needed only to derive generic implementations of FromJSON and ToJSON typeclasses so we move the declarations to Schema/JSON.hs and only derive Generic for data types that need it.
-
-
-
-
Add support for using schema AST as compiler input
File(s) with the `.json` extension are assumed to contain the JSON representation of schema abstract syntax tree in the format produced by `gbc schema`
Commits on Mar 24, 2015
Commits on Mar 25, 2015
-
Add CMake project to build documentation
The documentation is compiled from the markdown sources to html using `pandoc`. In order to install `pandoc` run: cabal install pandoc The documentation build is optional and if `pandoc` is not found during cmake project configuration the documentation build is skipped.
Commits on Mar 30, 2015
Commits on Apr 1, 2015
Commits on Apr 2, 2015
-
-
-
Fix parser bug for bonded<T> with forward declaration
A forward declaration is a valid type argument for bonded.
Commits on Apr 3, 2015
-
AppVeyor: 1. Work around memory limitations in Haskell build 2. Run subset of C# test matrix if the sandbox wasn't in cache Travis CI 1. Change project type to C++ 2. Install Mono manually in Linux 3. Use Clang as C++ compiler 4. cabal install happy
Commits on Apr 11, 2015
-
Add support for Deserializer without inlining
When the schemas dependency graph complexity increases, the expression trees that are generated by the DeserializeTransform can become very large, leading to long compilation times and high memory consumption. This change adds some Deserializer constructors that support a flag to disable expression inlining. As a result the runtime deserialization operation will be slightly slower (with some added overhead of function calls), but the initialization of the Deserializer is significantly faster.
Ran Raviv committedApr 11, 2015
Commits on Apr 21, 2015
-
The tests compare checked-in generated files with code generated using the current compiler. Discrepancy indicates a change in the generated code which may be a bug or an intentional change. In the latter case the generated file(s) should be re-generated and updated in the same commit as the change. Note that the checked-in files are generated with --no-banner option.
-
-
-
Commits on Apr 23, 2015
-
Parser: - map<Alias, T> should be valid for type aliases of the string type. C# codegen: - nullable<Alias> should generate Type? for aliases of scalar types. C++ codegen: - Fields of an alias type can have default value if the aliased type allows explicit defaults. - The allocator constructor had unused allocator parameter in some cases.
-
Work around the unused import warnings
Prelude changes implementing the Functor/Applicative/Monad-Proposal as well as the Foldable/Traversable-Proposal cause unused import warnings on GHC 7.10.
-
-
Merge pull request #55 from ranrav/no-inlining-deserializer
Add support for Deserializer without inlining
Commits on Apr 27, 2015
-
Don't initialize BondCodegen.Options in .targets
The BondCodegen.Options property (the per-file Bond codegen options) should to be initialized. The build should either uses the global options (the BondOptions property) to compile multiple schema files in a batch, or the per-file Options property to compile individual files that need different options. Initializing the BondCodegen.Options to BondOptions breaks the conditional which determines which schema files can be compiled as one batch.
Commits on Apr 28, 2015
-
-
Fix broken links in the documentation
Fix links broken with the move of IDL syntax documentation to compiler.html.
-
-
Explicitly specify short names of compiler options
The cmdargs library silently skips short names for options if more than one option starts with the same letter. This can lead to inadvertent breaks when a new option is added, like happened with adding `--no-banner` option, breaking the short name -n for the `--namespace` option.
-
-
Commits on May 19, 2015
-
- Conditionally compile bond::blob convert/extract routines based on Python version with PyString_Type or PyBytes_Type - Update Python unit tests to be compatible with Python3 - Generalize python/boost vars in Config.cmake to allow Python3 - Update python docs for blob
Commits on May 30, 2015
-
1) When running the generated makefile with multiple jobs the `cabal install` could start before `cabal sandbox` finished initializing the sandbox leading to packages being installed globally and not available during `cabal build` which expects dependencies in the sandbox. 2) Tarvis CI build sometimes would fail because nuget couldn't reach the online repository. Added `travis_retry` to mitigate the problem.
Commits on Jun 5, 2015
-
Fix name conflict in C++ unit test
Because unit test code has `using namespace std;` under VC14 RC unqualified `empty` is ambiguous.
Commits on Jun 6, 2015
Commits on Jun 11, 2015
-
Work around a compiler bug in VS2015 RTM
The compiler has a bug that won't be fixed until Update 1: it doesn't resolve decltype in type arguments of a partial specialization. As a workaround we define and use a type alias for the type of std::ignore.
Commits on Jun 12, 2015
-
Add to the build matrix: - GCC compiler - C# tests on OSX - Non-default versions of GHC on Linux - Python tests Separate C++ and C# tests as distinct builds (C# still depends on core C++ build to get the gbc compiler).
-
Commits on Jun 17, 2015
-
Signed-off-by: Vineel Kumar Reddy Kovvuri <vineel.kovvuri@gmail.com>
-
Merge pull request #64 from vineelkovvuri/master
Fix a typo in C# user's manual
Commits on Jun 22, 2015
-
Use version number from cabal generated module
Remove the manually maintained Bond.Version module and use the cabal generated Paths_bond module instead.
-
-
Remove internal functions from exposed modules
Some of the functions are used only internally by the parser while others are used by the built-in codegen templates but are to specific to expose them as public APIs. If a custom codegen needs similar functionality it can be easily implemented using the more generic helpers.
-
Add Haddock documentation comments
Rearranged and renamed some public APIs and moved some symbols to private, unexposed modules.
-
-
Eliminate Marshaler/Serializer code duplication
Marshaler is a thin wrapper over Serializer adding 4 byte header specifying protocol and its version. While the previous implementation of Marshaler reused the Serializer source code, it resulted in a lot of duplication of executable code if both Serializer and Marshaler were instantiated for the same type(s). With this change Apply for Marshaler simply delegates to Apply for Serializer.
-
Use fast pass-through for bonded<T, Reader&>
Fast pass-through avoids field-by-field transcoding when source and destination protocol are the same. Instead it just chains the source blob into the serialization output. Previously fast pass-through was hooked only for transcoding using bonded<T> but not on bonded<T, Reader&>. In addition to improving performance this change decreases build-time and size of executable code for the generated _apply.cpp which defines transcoding overloads for Apply with bonded<T, Reader&>.
-
Allow fixing version of multi-version protocols
When a protocol supports multiple version some compile-time optimizations become impossible. For example protocol transcoding always has to check version at runtime and perform fast pass-through only when version of source and target are the same. Consequently both code paths, fast pass-through and field-by-field transcoding, must be instantiated, increasing build time and size of the executable code. This change defines a global protocol trait that can be specialized by an application to fix the version of a protocol. Effectively application can promise to use only one version of the protocol (defined by bond::default_version<Reader>). For example in order to use only the version 2 of Compact Binary protocol application could include a header file in the generated code using --header option: gbc c++ --header="<compact_binary_v2.h>" foo.bond where compact_binary_v2.h contains: #include <bond/core/traits.h> #include <bond/core/bond_version.h> namespace bond { template <typename Input> class CompactBinaryReader; template <typename Input> struct default_version<CompactBinaryReader<Input> > { static const uint16_t value = v2; }; template <typename Input> struct enable_protocol_versions<CompactBinaryReader<Input> > : false_type {}; }
-
Fix formating of compiler errors
Use putStrLn instead of print to output parser errors from gbc.
-
Commits on Jun 27, 2015
-
Expand code generation test coverage
1) Add custom allocator variant for all C++ cases. 2) Add collection interfaces variant for all C# cases. 3) Generated _apply.h/cpp is not schema content specific so it is sufficient to test for one schema file.
Commits on Jun 28, 2015
Commits on Jun 29, 2015
-
Reimplement code generation tests with Tasty.Golden
Make each generated file comparison into a goldenTest case. Golden files can be updated/added for changes in codegen/tests using --accept command line switch.
Commits on Jun 30, 2015
-
Add C++ and compiler tests to appveyor matrix
- Remove the `os` property to move to the new, faster build environment. - Use the `check` target for C++ build to run C++ and gbc tests. - Update boost to version 1.58.
Commits on Jul 1, 2015
-
Revamp C# type mappings and codegen
- Add support for type mapping specific annotated type name and declaration type name. - Rename collection interfaces type mapping. - Clean up white spaces in the generated _types.cs. - Allow omitting [Bond.Default] attribute for scalar properties on interfaces.
Commits on Jul 4, 2015
-
Remove Appveyor build speed workaround
We used to run all C# tests only when we could restore cabal sandbox from the cache and avoid building all Haskell dependencies. The new Appveyor VMs are much faster and this is no longer necessary.
Commits on Jul 5, 2015
-
Simplify Appveyor configuration
With the faster Appveyor build VMs we don't need to customize the build so much to finish it within time limit. We can now use more declarative build matrix instead of custom build script.
Commits on Jul 6, 2015
Commits on Jul 7, 2015
-
Remove the exe extension from doxygen program name
Doxygen is available on non-Windows platform so name w/o the exe extension allows building docs on other platforms.
-
-
Commits on Jul 8, 2015
Commits on Jul 28, 2015
-
Fix a bug with nullable type aliases
When a type alias that is mapped to a custom type is used in nullable Bond needs to apply user defined converter to the value inside the Nullable<T> wrapper rather than the Nullable<T> itself.
Commits on Jul 29, 2015
-
Add a reference to NUnit.VisualStudio.TestAdapter
This allows running NUnit test from Visual Studio.
-
Fix a bug with derived protocol reader/writer
Protocol reader/writer implementations that inherit some methods from the base protocol implementation cause null reference exception. GetDeclaredMethods returns only methods declared in a given type. In order to get inherited methods we need to explicitly query for methods of the base type.
Commits on Jul 30, 2015
Commits on Aug 14, 2015
-
Fix bugs when using C# structs to represent schemas
Removed the assumptions that Bond schemas are represented by reference types. Added unit tests for structs.
Commits on Aug 18, 2015
-
Compile C++ code with -Wall -Werror
Use -Wall -Werror on Clang and GCC and /W4 /WX on MSC. A few overeager MSC level 4 warnings are disabled via pragmas in warning.h which is included in the build using /FI compiler flag.
Commits on Aug 19, 2015
-
Allow split python struct defs across many files
- Define py_object_identity as static - Inline register_builtin_converters for linker - Fix typo of name register_builtin_converters
-
Merge pull request #77 from alfpark/py3k
Allow splitting python struct defs across many files
Commits on Aug 20, 2015
Commits on Aug 21, 2015
-
Optimize Serializer for type-aliased blob fields
Reduce number of calls to BondTypeAliasConverter.Convert methods for type-aliased blobs fields.
Commits on Aug 22, 2015
-
Merge pull request #79 from alexsatch/master
Optimize Serializer for type-aliased blob fields
Commits on Aug 25, 2015
-
Work around g++ 4.8 issue in Python implementation
g++ 4.8 fails to properly resolve the Apply overload used in Python implementation. As a workaround we call the bond::detail::NextProtocol directly.
-
Switch Travis CI to container based infrastructure
- Switch project language to csharp in order to get built-in installation of Mono on Linux and OSX. - Use addons to install Linux packages instead of calling `sudo apt-get` - Since g++ and clang++ are the same compiler on OSX eliminate one from the build matrix. - Add C++ Clang build and test to Linux matrix. - Add python unit test and example to the Linux build matrix. - Install cmake directly from cmake.org to avoid use of sudo.
-
Commits on Aug 26, 2015
-
Add cabal constraint: process < 1.3
The gbc-tests dependencies require process < 1.3 leading to dependency conflicts if the sandbox has been first populated with dependencies of Bond library before configuring the test suite. This is a (hopefully) temporary workaround until pcapriotti/optparse-applicative#150 is merged.
Commits on Aug 27, 2015
-
Don't cast the instance contained in Bonded<T>
Bonded<T> is an implementation of IBonded<T> which contains an instance of type T. When it is converted or deserialized to another type U we should not cast the object instance. Deserialization is implemented using cloning which doesn't require any cast at all because Clone<U>.From<T> doesn't require that U and T are the same type. For conversion to IBonded<U> instead of creating a new Bonded<T> from casted object instance we can cast the Bonded<T> object to IBonded<U>. This fixes bug #71.
Commits on Aug 28, 2015
Commits on Sep 9, 2015
-
Don't try to commit documentation w/o GitHub token
Fixed the condition detecting that secure token variable is not set, e.g. in a PR build.
Commits on Sep 20, 2015
Commits on Sep 24, 2015
-
Fix buffer allocation performance bugs
The code was using wrong Boost function for allocating char[]. The right methods are make_shared_noinit and allocate_shared_noinit. The methods w/o _noinit suffix initialize every element of the allocated array which obviously is unneeded and has a horrific performance impact. The bug impacted OutputBuffer, and thus typically serialization, blob merging and Simple Json deserialization of blobs.
Commits on Sep 27, 2015
-
Fix containers of nullable<T> and blob in Python
Custom converters from a C++ type to a Python type are not invoked when accessing container elements by reference (the default access policy). This lead to an error when accessing elements of a container of nullable<T> or blob. The fix is to return elements by value for types that have a converter.
Commits on Oct 2, 2015
-
Don't allow JSON null for scalar types
Bond value nothing does not have a wire representation. Optional fields set to nothing are omitted during serialization and required fields cause exception. Simple JSON parser was incorrectly returning null as a value when a scalar was expected. This appeared to work during Deserialization for fields with default nothing because they are represented by Nullable in C#. However that was only a lucky accident of the Deserializer implementation. Transforms in general are not expected to be able to handle null as result from IParser.Scalar.
-
-
Fix fields of alias type with the default
nothing
Incorrect [Type] attribute annotation on fields with default `nothing` lead to failure to find the type converter for type aliases with a custom type mapping.
Commits on Oct 12, 2015
Commits on Oct 13, 2015
-
Revert "Add cabal constraint: process < 1.3"
This reverts commit f0d23a0, which was a workaround for overly strict constraint in optparse-applicative that was fixed with pcapriotti/optparse-applicative@22a71d8.
Commits on Oct 16, 2015
-
Fix C++ warnings with XCode 7 compiler
Clang included with XCode 7 has a new warning that isn't handled in Boost yet. Also fixed error using `abs` improperly with int64_t in Bond tests.
Commits on Oct 29, 2015
-
Removed section about Chocolatey because it is flaky, packages disappear or stop working.
-
Group CMake targets into folders
CMake uses the `FOLDER` property to group the generated Visual Studio projects into solution folders. Removed bond_ and documentation_ prefix from project names. The prefixes were intended to group projects by name which is no longer necessary.
Commits on Nov 5, 2015
-
Work around the old wget version in Travis CI
Work around for a problem with wget verifying new certificates: travis-ci/travis-ci#5059 Travis CI Trusty image is not ready yet, at this moment having problem with inconsistent Python versions.
Commits on Nov 9, 2015
-
-
Merge pull request #99 from redknightlois/typos
Fix typos in C# comments
Commits on Nov 10, 2015
-
Fail Appveyor build when C# tests fail
Setting $ErrorActionPreference = "Stop" doesn't appear to be sufficient to break the build on test failure.
-
Make fieldModifier and fieldAttributes optional
In the JSON representation of schema AST the fieldModifier and fieldAttributes properties can be omitted, simplifying field representation in the common case. Add to the documentation an example of AST in JSON format.
-
Fix generated C++ code using custom allocator
When generating C++ code with custom allocator (--allocator compiler flag) two cases resulted in invalid code: - If the only field that required allocator ctor argument was of a struct type then the allocator parameter name in the ctor of containing struct was omitted. - A field of type alias of a struct type was not initialized with custom allocator.
Commits on Nov 12, 2015
Commits on Nov 14, 2015
-
Add cabal constraint: process < 1.4
Unfortunately the conflict between optparse-applicative, which sets an upper bound on the version the process package dependency and cmdargs which only has a lower bound is going to reappear on every release of process. The problem happens when gbc dependencies are first installed in the sandbox and then we try to build gbc-tests using the same sandbox.
Commits on Nov 15, 2015
-
Merge pull request #101 from redknightlois/typos
Fix typos in C# comments
-
Removed all private modifiers as per review comment at #93
-
-
Commits on Nov 16, 2015
-
Integer limits tests need an exception because Newtonsoft JSON doesn't support support unsigned int64. Rewritten the test so that all limits are tested by default and only this one case is excluded for JSON.
Commits on Nov 17, 2015
-
Integer limits tests need an exception because Newtonsoft JSON doesn't support support unsigned int64. Rewritten the test so that all limits are tested by default and only this one case is excluded for JSON.
-
-
-
Fix off-by-one bug in varint decoding
The code was unnecessary going into slow path when decoding full size varint at the end of payload. Added an explicit test case since non-zero varint can never naturally occur in the current set of binary protocols (tagged protocols never have integer at the end of payload and Simple Binary, the only untagged protocol currently shipping with Bond, uses varint only for string/container length which also can't occur at the ned of payload).
-
Handle C# classes with a static constructor
C# classes with a static constructor (either added via partial class extension of a generated class or in manually defined class annotated with Bond attributes) would generate invalid expression tree for deserializer.
Commits on Nov 23, 2015
-
-
Merge pull request #104 from alfpark/py3k
Fix extra ref count on blob to PyBytes conversion
Commits on Nov 30, 2015
-
Implement input/output streams on unmanaged memory
Add implementation of IInputStream and IOutputStream on top of unmanaged memory buffer. Note that unlike other IOutputStream implementations, the OutputPointer does not have the ability to grow because it does not have ownership of the memory involved. Fixes #92.
-
-
Commits on Dec 2, 2015
-
Update Newtonsoft.Json dependency to version 7.0.1
We want Bond Nuget package to target .NET Core 5.0 and 7.0.1 is the first version of Newtonsoft.Json supporting dnxcore50 as the target in its Nuget package.
-
Add symbols to Nuget package specification
Symbols to be published in a separate symbols package: https://docs.nuget.org/create/creating-and-publishing-a-symbol-package
Commits on Dec 3, 2015
-
Fix logic determining which C++ headers to include
The C++ codegen failed to detect the need to generate #include <blob.h> when the only use of blob was a field with default `nothing`. For aliases of types that require extra header files the trigger should be the alias usage rather than alias declaration. Types of fields of base schema should not be considered.
-
-
-
-
-
Add gbc option to generate runtime schema from IDL
Running: gbc schema --runtime-schema example.bond will generate SchemaDef for each non-generic struct defined in the .bond file(s). The SchemaDef(s) will be serialized using Simple JSON protocol into file(s) named <source-file-name>.<struct-name>.json. Fixes #75.
Commits on Dec 4, 2015
-
Allow the word 'Schema' in namespace identifiers
The word 'Schema' is a reserved name in Bond lexer because it conflicts with the Schema struct in the generated C++ code. In order to support some legacy schema definitions we are relaxing the restriction, allowing the word to be used as part of namespace identifiers. The word Schema in a namespace identifier does not conflict with the Schema struct in the generated C++ code.
-
Support custom C# representations of bonded<T>
By default bonded<T> is represented by IBonded<T> and implemented by one of the built-in Bonded classes. This change allows users to define a custom type to represent bonded<T>. The type must implement IBonded interface and can be instantiated during de-serialization either using regular `new` (the constructor must take one argument of type IBonded) or with a user defined factory. The latter allows more seamless support for polymorphism during de-serialization because the factory can determine the type at runtime from the payload represented by IBonded argument.
-
Allow reader interfaces to be used with Bonded<T, R>
The protocol reader R in Bonded<T, R> must be clonable, i.e. it must implement IClonable<R> interface. Usually R is a specific protocol implementation however it is also possible to use an interface (1). This change defines new protocol reader interfaces which are clonable. (1) Instantiating Deserializer for a protocol reader interface rather than a specific protocol implementation trades off performance for the ability to use the same Deserializer with different protocols.
-
Remove redundant Tag.bonded<T> annotations
In regular codegen the [Type(typeof(Bond.Tag.bonded<Foo>)] annotation is not necessary because IBonded<T> already identifies the type as bonded<T>.
-
-