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

1441 Коммитов

Автор SHA1 Сообщение Дата
Ted Stein dfccf4f832 [travis] Add debugging info for gradle install failures 2018-03-02 19:20:17 -08:00
Ara Ayvazyan 183f339007 [c++] Remove is_blob/is_nullable traits
The blob and nullable types are not customizable. Also is_blob and
is_nullable traits are not part of container concept.

Closes https://github.com/Microsoft/bond/pull/805
2018-02-27 16:58:44 -08:00
Christopher Warrington 19988168cd [travis] Add garbage CI image clean up script
Every change (well, most every) to the master branch produces a new
Docker image (for our Linux CI builds). However, we don't use each new
image. Instead, occasionally someone updates .travis.yml to point to a
new image. Thus, there's a build up of Docker images in the repository
that aren't being used.

These images are garbage: garbage in the sense that they're not
reachable from any of the .travis.yml roots.

This commit adds a script that can be used to find and remove these
garbage images.

Given a set of filters to find root commits (e.g., we can specify all
tags and all commits in the past two weeks), the script finds all the
referenced Docker images in the various revisions to .travis.yml. It
then compares the referenced images to those present in the repository,
skips images that are too new to be collected, and--for now--prints the
`az` CLI command to remove that image.

The `az` CLI is implemented in Python, so Python is going to be
available wherever `az` is. Since this script was a bit too complicated
for a shell script, Python 3 was chosen as its implementation language.

This script is intended to be run inside a VSTS build using the Azure
CLI task [1]. However, it will work anywhere that `az login` has been
run and given credentials with read/write access to the
bondciimages.azurecr.io repository.

[1]: https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/AzureCLI/Readme.md
2018-02-27 16:01:51 -08:00
Ara Ayvazyan 92b2bfe928 [c++] Fix To::UnknownField to do not use ellipses 2018-02-27 13:28:36 -08:00
Ara Ayvazyan 4f4b9b1d90 [c++] Fix missing Protocols type arg in Merger 2018-02-20 17:54:09 -08:00
Ted Stein b6162e5cac Recommend to install the latest stack in README
Recommend curlbashing Stack instead of package management in the README. We
already do this for our CI image.
2018-02-20 17:51:42 -08:00
Christopher Warrington 6faa185444 [git] Make Linux scripts always use LF
Linux scripts need to always have LF. If not, things like building a
Docker image from Windows will result in un-runable scripts. Update
.gitattributes so these files are always checked out LF.
2018-02-16 14:05:04 -08:00
Christopher Warrington c7bb8f6385 [git] Update .gitattributes with new extensions
Since we've added Java, some new "known-to-be-text" files exist in the
repository.
2018-02-16 14:05:04 -08:00
Christopher Warrington 1da827d0e3 [git] Fix globs in .gitattributes
The globs in .gitattributes were missing the leading * to match files.
2018-02-16 14:05:04 -08:00
Christopher Warrington 230b341565 [travis java] Switch to openjdk-8-jdk-headless
Use the "headless" JDK in the Travis CI image to avoid installing a
bunch of X11 (and related) packages that we don't need. This also
reduces the size of the image.

After getting this commit into master, the next step is to wait for a
new image to be built and then consume that image in .travis.yml.

[skip ci]
2018-02-13 14:18:55 -08:00
Ted Stein a9167d7ccc [cmake] Print out errors from failed stack steps
Per [cmake docs](https://cmake.org/cmake/help/v3.0/command/execute_process.html), if you set both `OUTPUT_VARIABLE` and `ERROR_VARIABLE` to the same var, it will contain both streams' lines, merged in the order they were printed.
2018-02-13 09:18:07 -08:00
Ara Ayvazyan f32cf13c2b [doc] Improve syntax highlighting
Language-specific syntax highlighting now used on code blocks.
2018-02-05 18:49:27 -08:00
Ted Stein 95747ded0b [c++] #include <new> for std::bad_alloc
Resolves https://github.com/Microsoft/bond/issues/786
2018-02-01 09:23:30 -08:00
Christopher Warrington cf0de7f1df [gbc] Clean up service AST documentation
* Remove duplicate "Service" section.
* Remove incorrect "Service method" that talked about passing messages
  and services, which was never implemented in gbc.
2018-01-31 15:58:26 -08:00
Christopher Warrington 14c425bd57 Fix whitespace in .gitmodules
Tabs to spaces.
2018-01-29 10:08:59 -08:00
Christopher Warrington fc1581a114 Ignore dirty grpc submodule
When using CMake to build, the zlib submodule inside of the grpc
submodule ends up with a generated file that makes Git consider the
submodule dirty. This state can be ignored for day-to-day development.
2018-01-26 08:55:07 -08:00
Christopher Warrington 0054ec653b [c++] Add missing static_casts in io_manager tests
grpc::Alarm takes a void*, but io_manager expects io_manager_tag*. Thus,
we should have been casting alarm_completion_tag* to io_manager_tag*.
2018-01-17 11:29:58 -08:00
Ara Ayvazyan 88635fc413 [c++] Fix potential size overflow in binary protocols' Skip 2018-01-12 14:24:20 -08:00
Ara Ayvazyan 03b4484b56 [c++] Fix potential loop overflows 2018-01-11 08:08:08 -08:00
Ara Ayvazyan 27e91d5119 [c++] Improve compact/fast binary protocols' Skip 2018-01-10 11:36:58 -08:00
Christopher Warrington e96a8deb44 [travis] Add Boost 1.66 flavors
* Switch G++ tests to use Boost 1.66
* Add Clang++ test for Boost 1.66
* Switch CI image to one built from commit 0637203975
2018-01-09 11:00:12 -08:00
Ara Ayvazyan 05d6783e08 [c++ grpc] Simplify io_manager::wait 2018-01-08 17:41:53 -08:00
Christopher Warrington 0637203975 [travis] Add Boost 1.66 to CI image builder script
This is the first step in enabling Boost 1.66 CI build on Travis. After
an image is produced that contains Boost 1.66, we still need to consume
that image in .travis.yml and add 1.66 to the configuration matrix.

I've locally tested that Bond builds and the basic tests pass with Boost
1.66 using Clang.
2018-01-08 16:22:05 -08:00
Ara Ayvazyan 8eebf59d88 [c++ grpc] Fix race in unary_call destruction 2018-01-08 16:13:38 -08:00
Ara Ayvazyan 55509efb11 [c++ grpc] Fix race in io_manager
Fixes a race condition when `bond::ext::gRPC::io_manager::shutdown` and
`bond::ext::gRPC::io_manager::wait` are called concurrently. The functions
are not mutually exclusive and the latter destroys the
`grpc::CompletionQueue` which is not necessary.

Fixes https://github.com/Microsoft/bond/issues/744
2018-01-05 17:14:38 -08:00
Ara Ayvazyan ffae9a86a8 [c++ grpc] Fix atomic_flag init. in io_manager 2017-12-29 17:37:30 -08:00
Ara Ayvazyan 2f5619d9d4 [c++ grpc] Fix std::atomic_flag initialization 2017-12-29 10:45:11 -08:00
Ara Ayvazyan 4720490e14 [c++ grpc] Fix incorrect casts to void*
The bond::ext::gRPC::io_manager expects pointers to bond::ext::gRPC::io_manager_tag base when it receives void* tags. However, we are are directly passing a pointer to derived type instead of explicitly casting to base (which does not cause issues due to current layout of those objects).
2017-12-29 10:44:33 -08:00
Ara Ayvazyan 533092bb25 [c++] Minor refactoring of bond::MapTo 2017-12-20 15:18:21 -08:00
Ara Ayvazyan f2c105f279 [c++] Fix missing type param. in MapTo<T>::Field 2017-12-19 11:22:21 -08:00
Ara Ayvazyan e59bd43f20 [c++] Improve StaticParser<Input>::ReadFields
Simplifies the StaticParser<Input>::ReadFields function when used with protocols that do not implement field omitting by excluding some run-time code paths.
2017-12-18 13:35:08 -08:00
Ara Ayvazyan 5274f45f70 [doc] Update README with min. stack version 2017-12-18 11:16:33 -08:00
Ara Ayvazyan 03c685ecb4 [c++] Use extern template for common code 2017-12-14 14:55:57 -08:00
Christopher Warrington 3e03d438cf [c++] Add toolchain agnostic integration instructions 2017-12-14 14:42:11 -08:00
Ara Ayvazyan 0cc2355067 [c++] Minor refactoring of bond::To 2017-12-14 13:25:48 -08:00
Ara Ayvazyan d5d7927b3a [c++] Improve bonded<void, Reader>::_Apply
Simplifies the `bonded<void, Reader>::_Apply` function when used with
protocols that specify `uses_marshaled_bonded<Reader>` to be `false_type`
(currently all except `Simple`) by excluding some run-time code paths.
2017-12-13 13:09:41 -08:00
Ara Ayvazyan cf56ab5099 [c++] Improve UnknownFieldOrTypeMismatch
Simplifies the `DynamicParser<Input>::UnknownFieldOrTypeMismatch` function
for basic types by excluding some run-time code paths.
2017-12-13 13:09:10 -08:00
Ara Ayvazyan 9edf0a4c55 [c++] Remove duplicated code in DynamicParser 2017-12-13 13:08:36 -08:00
Ara Ayvazyan 9ca99d45b8 [c++] Fix base to derived deserialization
With this change deserialization will now fail by throwing `bond::CoreException` when `BT_STOP` is encountered while deserializing a base struct.

Fixes https://github.com/Microsoft/bond/issues/742
2017-12-11 13:34:17 -08:00
Christopher Warrington 524921206a
[c# grpc] Allow [Bond.Attribute] on methods
* This fixes broken C# codegen when a service method has attributes.
* Add both C++ and C# unit test to make sure that service and method
  attributes are properly generated and accessible.

Fixes https://github.com/Microsoft/bond/issues/617
2017-12-07 17:38:40 -08:00
Christopher Warrington 7b6dcedd7a
[travis] Automate building of Docker images
* Use `docker pull` to download a pre-built image from
  bondciimages.azurecr.io instead of `wget` then `docker load`.
    * This speeds up image downloading by about 25%.
* Update tools/ci-scripts/linux/image-builder/README.md to indicate that
  images are built automatically in a Microsoft VSTS build queue.
* Delete helper build_image.zsh and upload_image.zsh scripts.
2017-12-07 17:37:49 -08:00
Christopher Warrington 95c4f9d6e4 [c++ grpc] Fix includes when bond::Void is used
When a service contains events or parameter-less methods, the generated
code uses `bond::Void` as the request/result type. To serialize
`bond::Void`, bond_reflection.h needs to be included.

The generated service code now includes bond_reflection.h if any service
contains an event or a parameter-less method.

Fixes https://github.com/Microsoft/bond/issues/735
2017-12-05 18:07:41 -08:00
Ara Ayvazyan 48c4d43011 [gbc c++] Use Pass0 instead of private counter 2017-12-04 18:06:30 -08:00
Eduardo Salinas 5f82bc68b1 [gbc] Switch from Parsec to Megaparsec
- gbc can only be built with GHC >= 8.0.1
- stack resolver has been updated
- improve error messages
- add a comment about parser ordering to avoid regression
- added python script to compare gbc outputs
2017-12-04 18:00:37 -08:00
Ara Ayvazyan 924050a30d [c++] Make Serializer::Field faster to compile
The change adds overloads of `Serializer::Field` function that avoids generating calls to `detail::omit_field` in the cases where the result is known at compilation. This makes the compilation a bit faster (it depends on actual types being used, but the expected estimate would be 3-5%) and also likely to generate faster, smaller and more efficient runtime code when compiler fails to optimize away the above calls.
2017-12-04 17:16:22 -08:00
Ted Stein 77a2f76a92 Generate Java docs properly + add gradle plugin docs
* Generate Java docs properly.

* Add explicit documentation of the Gradle plugin.

* Update Java documentation and improve linking.
2017-12-04 16:33:51 -08:00
Ted Stein a8ad34994f Add Java guide. 2017-12-01 15:39:00 -08:00
Ted Stein ae93a9f2e9 java core: Make protocol version vars consistent. 2017-12-01 15:39:00 -08:00
Christopher Warrington 46527ce7df [c++] Copy edit coding guidelines 2017-11-27 13:33:36 -08:00
Christopher Warrington 7189d4c4e0 [c++] Clean up includes
* Use `#pragma once` everywhere.
* Every header now include `<bond/core/config.h>` before anything else.
* Includes are done in sections, from least general to most general.
* Includes within each section are sorted in lexicographical order.
* CODING_GUIDELINES_CPP.md added to capture these guidelines.
2017-11-27 13:05:07 -08:00